Skip to content

Commit c0deead

Browse files
committed
Frontend: Remove Firebase and leaderboard-related code
Remove all Firebase dependencies and leaderboard functionality that is no longer needed. This resolves TypeScript compilation errors related to undefined Firebase configuration properties. Changes: - Removed Firebase configuration from environment files - Removed Firebase imports and providers from app.config.ts - Removed unused uptime-pill component reference from toolbar - Removed showLeaderboard conditional from web-node file upload - Removed Firebase debug token comment from main.ts - Cleaned up unused Firebase npm dependencies This fixes the 'Property firebase does not exist on type' error in the frontend build.
1 parent 8dab070 commit c0deead

File tree

10 files changed

+14
-155
lines changed

10 files changed

+14
-155
lines changed

frontend/firebase.json

Lines changed: 0 additions & 82 deletions
This file was deleted.

frontend/package-lock.json

Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

frontend/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,6 @@
5858
"d3": "^7.8.4",
5959
"eigen": "^0.2.2",
6060
"express": "^4.18.2",
61-
"firebase": "^11.0.1",
6261
"jszip": "^3.10.1",
6362
"mathjs": "^12.3.0",
6463
"mina-signer": "^3.0.7",

frontend/src/app/app.config.ts

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -31,16 +31,7 @@ import {
3131
safelyExecuteInBrowser,
3232
THEME_PROVIDER,
3333
} from '@openmina/shared';
34-
import { SETTINGS } from '@angular/fire/compat/firestore';
35-
import { initializeApp, provideFirebaseApp } from '@angular/fire/app';
3634
import { CONFIG } from '@shared/constants/config';
37-
import {
38-
getAnalytics,
39-
provideAnalytics,
40-
ScreenTrackingService,
41-
} from '@angular/fire/analytics';
42-
import { getPerformance, providePerformance } from '@angular/fire/performance';
43-
import { getFirestore, provideFirestore } from '@angular/fire/firestore';
4435
import localeFr from '@angular/common/locales/fr';
4536
import localeEn from '@angular/common/locales/en';
4637
import { metaReducers, reducers } from '@app/app.setup';
@@ -147,24 +138,6 @@ export class AppGlobalErrorhandler implements ErrorHandler {
147138
}
148139
}
149140

150-
const firebaseProviders = [
151-
{
152-
provide: SETTINGS,
153-
useValue: { experimentalForceLongPolling: true },
154-
},
155-
provideFirebaseApp(() => initializeApp(CONFIG.globalConfig.firebase)),
156-
provideAnalytics(() => getAnalytics()),
157-
ScreenTrackingService,
158-
// provideAppCheck(() => {
159-
// // TODO get a reCAPTCHA Enterprise here https://console.cloud.google.com/security/recaptcha?project=_
160-
// const app = getApp();
161-
// const provider = new ReCaptchaV3Provider('6LfAB-QqAAAAAEu9BO6upFj6Sewd08lf0UtFC16c');
162-
// return initializeAppCheck(app, { provider, isTokenAutoRefreshEnabled: true });
163-
// }),
164-
providePerformance(() => getPerformance()),
165-
provideFirestore(() => getFirestore()),
166-
];
167-
168141
export const appConfig: ApplicationConfig = {
169142
providers: [
170143
provideRouter(generateRoutes()),
@@ -207,6 +180,5 @@ export const appConfig: ApplicationConfig = {
207180
multi: false,
208181
},
209182
{ provide: Sentry.TraceService, deps: [Router] },
210-
...(CONFIG.globalConfig.firebase ? firebaseProviders : []),
211183
],
212184
};

frontend/src/app/features/web-node/web-node-file-upload/web-node-file-upload.component.html

Lines changed: 14 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -127,24 +127,20 @@ <h2>Set Up Your Web Node</h2>
127127
}
128128
<div class="buttons-container fx-row-vert-cent flex-between">
129129
<div class="develop-buttons fx-row-vert-cent">
130-
@if (!isLeaderboard) {
131-
<button
132-
class="btn-aware h-lg border-rad-8 f-500 pl-12 pr-12"
133-
[tooltip]="'Start a develop Block Producer Web Node'"
134-
(click)="onStartDevelopWebnode()"
135-
>
136-
Start BP
137-
</button>
138-
<button
139-
class="btn-aware h-lg border-rad-8 f-500 pl-12 pr-12"
140-
[tooltip]="
141-
'Start a develop Web Node without Block Producer feature'
142-
"
143-
(click)="onStartDevelopWebnodeNonBP()"
144-
>
145-
Start Non BP
146-
</button>
147-
}
130+
<button
131+
class="btn-aware h-lg border-rad-8 f-500 pl-12 pr-12"
132+
[tooltip]="'Start a develop Block Producer Web Node'"
133+
(click)="onStartDevelopWebnode()"
134+
>
135+
Start BP
136+
</button>
137+
<button
138+
class="btn-aware h-lg border-rad-8 f-500 pl-12 pr-12"
139+
[tooltip]="'Start a develop Web Node without Block Producer feature'"
140+
(click)="onStartDevelopWebnodeNonBP()"
141+
>
142+
Start Non BP
143+
</button>
148144
</div>
149145
<button
150146
class="whitey h-lg border-rad-8 f-500 pl-12 pr-12"

frontend/src/app/features/web-node/web-node-file-upload/web-node-file-upload.component.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ export class WebNodeFileUploadComponent extends ManualDetection {
3434
validFiles: boolean = false;
3535
error: boolean = false;
3636
uploadedFileName: string;
37-
isLeaderboard: boolean = CONFIG.showLeaderboard;
3837

3938
constructor(private webnodeService: WebNodeService) {
4039
super();

frontend/src/app/layout/toolbar/toolbar.component.html

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,6 @@
2222
@if (!isMobile) {
2323
<mina-error-preview></mina-error-preview>
2424
}
25-
@if (showUptime) {
26-
<mina-uptime-pill></mina-uptime-pill>
27-
}
2825
<div
2926
class="server-pill flex-row flex-end align-center flex-grow"
3027
[class.bootstrapping]="!haveNextBP || isAllNodesPage"

frontend/src/environments/environment.ts

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,6 @@ export const environment: Readonly<MinaEnv> = {
2828
benchmarks: ['wallets'],
2929
fuzzing: [],
3030
},
31-
firebase: {
32-
apiKey: 'AIzaSyBZzFsHjIbQVbBP0N-KkUsEvHRVU_wwd7g',
33-
authDomain: 'webnode-gtm-test.firebaseapp.com',
34-
projectId: 'webnode-gtm-test',
35-
storageBucket: 'webnode-gtm-test.firebasestorage.app',
36-
messagingSenderId: '1016673359357',
37-
appId: '1:1016673359357:web:bbd2cbf3f031756aec7594',
38-
measurementId: 'G-ENDBL923XT',
39-
},
4031
heartbeats: false,
4132
// graphQL: 'https://api.minascan.io/node/devnet/v1/graphql',
4233
// graphQL: 'http://65.109.105.40:5000/graphql',

frontend/src/environments/environment.webnode-local.ts

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,6 @@ export const environment: Readonly<MinaEnv> = {
1515
mempool: [],
1616
benchmarks: ['wallets'],
1717
},
18-
firebase: {
19-
apiKey: 'AIzaSyBZzFsHjIbQVbBP0N-KkUsEvHRVU_wwd7g',
20-
authDomain: 'webnode-gtm-test.firebaseapp.com',
21-
projectId: 'webnode-gtm-test',
22-
storageBucket: 'webnode-gtm-test.firebasestorage.app',
23-
messagingSenderId: '1016673359357',
24-
appId: '1:1016673359357:web:bbd2cbf3f031756aec7594',
25-
measurementId: 'G-ENDBL923XT',
26-
},
27-
heartbeats: false,
2818
},
2919
configs: [
3020
{

frontend/src/main.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ import { bootstrapApplication } from '@angular/platform-browser';
44
import { AppComponent } from '@app/app.component';
55
import { appConfig } from '@app/app.config';
66

7-
// (window as any).FIREBASE_APPCHECK_DEBUG_TOKEN = 'A4B7AFB5-1534-4D5A-A02E-BCF5847C07F0';
8-
97
if (CONFIG.production) {
108
initSentry();
119
}

0 commit comments

Comments
 (0)