mirror of
https://github.com/cerc-io/watcher-ts
synced 2026-09-07 16:34:06 +00:00
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:
@@ -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 => {
|
||||
|
||||
Reference in New Issue
Block a user