diff --git a/packages/trie-db/src/BaseTrie.ts b/packages/trie-db/src/BaseTrie.ts index 1ff3aac8f..dc24fc732 100644 --- a/packages/trie-db/src/BaseTrie.ts +++ b/packages/trie-db/src/BaseTrie.ts @@ -41,8 +41,7 @@ export default class BaseTrie { putRaw: RawPutFn; semaphore: SemaphorePromise; - // @ts-ignore FIXME, we need to properly check the full file - constructor (db, root: Uint8Array, hashing: HashFn) { + constructor (db: any, root: Uint8Array, hashing: HashFn) { this.putRaw = this._putRaw; this.semaphore = semaphore(1); diff --git a/packages/trie-db/src/CheckpointTrie.ts b/packages/trie-db/src/CheckpointTrie.ts index 7f45096f0..d1dec365b 100644 --- a/packages/trie-db/src/CheckpointTrie.ts +++ b/packages/trie-db/src/CheckpointTrie.ts @@ -36,7 +36,7 @@ export default class CheckpointTrie extends BaseTrie { __putDBs: any[]; // tslint:disable-line // @ts-ignore FIXME, we need to properly check the full file - constructor (db, root: Uint8Array, hashing: HashFn) { + constructor (db: any, root: Uint8Array, hashing: HashFn) { super(db, root, hashing); this._scratch = null; diff --git a/packages/trie-db/src/index.ts b/packages/trie-db/src/index.ts index b2ca5bf01..927e4e8cb 100644 --- a/packages/trie-db/src/index.ts +++ b/packages/trie-db/src/index.ts @@ -9,6 +9,7 @@ import { HashFn } from './types'; import keccakAsU8a from '@polkadot/util-crypto/keccak/asU8a'; import CheckpointTrie from './CheckpointTrie'; +import { EMPTY_ROOT_U8A } from './constants'; import { prove, verifyProof } from './proof'; // const l = logger('trie'); @@ -17,8 +18,7 @@ export default class Trie extends CheckpointTrie { static prove = prove; static verifyProof = verifyProof; - // @ts-ignore FIXME, we need to properly check the full file - constructor (db, root, hashing: HashFn = keccakAsU8a) { + constructor (db: any, root: Uint8Array = EMPTY_ROOT_U8A, hashing: HashFn = keccakAsU8a) { super(db, root, hashing); // l.debug('Created Trie');