Avoid creating a separate base db instance for graph database (#221)

* Avoid creating a separate base db instance for graph database

* Fix failing test file build

* Use getter method to get base database
This commit is contained in:
prathamesh0
2022-11-10 14:51:18 +05:30
committed by GitHub
parent ecd8b2474a
commit 8d3c68873b
40 changed files with 63 additions and 115 deletions
+3 -2
View File
@@ -3,7 +3,7 @@
//
import { BaseProvider } from '@ethersproject/providers';
import { getCustomProvider } from '@cerc-io/util';
import { getCustomProvider, Database as BaseDatabase } from '@cerc-io/util';
import { EthClient } from '@cerc-io/ipld-eth-client';
import { StorageLayout } from '@cerc-io/solidity-mapper';
@@ -71,7 +71,8 @@ export const getDummyGraphData = (): any => {
};
export const getTestDatabase = (): Database => {
return new Database({ type: 'postgres' }, '');
const baseDatabase = new BaseDatabase({ type: 'postgres' });
return new Database(baseDatabase);
};
export const getTestIndexer = (storageLayout?: Map<string, StorageLayout>): Indexer => {