Skip to content

Commit

Permalink
Db roll fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Boldizsar Mezei committed Nov 7, 2023
1 parent e50dc7d commit 128a26c
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions packages/database/src/app/build5App.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import admin from 'firebase-admin';
import { FirebaseApp } from './app';

admin.initializeApp();
const defaultApp = admin.initializeApp(undefined, 'defaultApp');

export const build5App = () => new FirebaseApp(admin.app());
export const build5App = new FirebaseApp(defaultApp);
2 changes: 1 addition & 1 deletion packages/database/src/firestore/build5Db.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { build5App } from '../app/build5App';
import { Firestore } from './firestore';
import { IDatabase } from './interfaces';

export const build5Db = (): IDatabase => new Firestore(build5App());
export const build5Db = (): IDatabase => new Firestore(build5App);

export const getSnapshot = (
col: COL | PublicCollections,
Expand Down
2 changes: 1 addition & 1 deletion packages/database/src/storage/build5Storage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ import { build5App } from '../app/build5App';
import { IStorage } from './interfaces';
import { FirebaseStorage } from './storage';

export const build5Storage = (): IStorage => new FirebaseStorage(build5App());
export const build5Storage = (): IStorage => new FirebaseStorage(build5App);
2 changes: 1 addition & 1 deletion packages/functions/test/dbroll/nft.auction.roll.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ describe('Nft auction roll', () => {
mintingData: { network: Network.ATOI },
});

await nftAuctionRoll(build5App());
await nftAuctionRoll(build5App);

nft = <Nft>await nftDocRef.get();

Expand Down
2 changes: 1 addition & 1 deletion packages/functions/test/dbroll/set.project.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ describe('Set project', () => {
const memberDocRef = spaceDocRef.collection(SUB_COL.MEMBERS).doc(memberId);
await memberDocRef.create({ uid: memberId });

await setProjectRoll(build5App());
await setProjectRoll(build5App);
});
});

0 comments on commit 128a26c

Please sign in to comment.