This commit is contained in:
Jaco Greeff
2021-01-17 16:03:59 +01:00
committed by GitHub
parent 510d33fd89
commit 1a1f351207
16 changed files with 147 additions and 246 deletions
+5 -1
View File
@@ -110,7 +110,11 @@ export class Base {
}
this.#keyring = keyring;
this._genesisHash = options.genesisHash && options.genesisHash.toHex();
this._genesisHash = options.genesisHash && (
isString(options.genesisHash)
? options.genesisHash.toString()
: options.genesisHash.toHex()
);
this._store = options.store || this._store;
this.addAccountPairs();
+1 -2
View File
@@ -2,7 +2,6 @@
// SPDX-License-Identifier: Apache-2.0
import type { KeyringInstance as BaseKeyringInstance, KeyringOptions as KeyringOptionsBase, KeyringPair, KeyringPair$Json, KeyringPair$Meta } from '@polkadot/keyring/types';
import type { Hash } from '@polkadot/types/interfaces';
import type { KeypairType } from '@polkadot/util-crypto/types';
import type { AddressSubject, SingleAddress } from './observable/types';
@@ -40,7 +39,7 @@ export interface KeyringStore {
export interface KeyringOptions extends KeyringOptionsBase {
filter?: (json: KeyringJson) => boolean;
genesisHash?: Hash;
genesisHash?: string | { toHex: () => string };
isDevelopment?: boolean;
store?: KeyringStore;
}