Cater for Ethereum-compatible multisig addresses (#740)

This commit is contained in:
Jaco
2023-03-23 11:06:46 +02:00
committed by GitHub
parent aad690bfda
commit f0d21fa985
3 changed files with 29 additions and 2 deletions
+10
View File
@@ -22,6 +22,8 @@ export class Base {
#contracts: AddressSubject;
#isEthereum: boolean;
#keyring?: KeyringInstance;
protected _store: KeyringStore;
@@ -34,6 +36,7 @@ export class Base {
this.#accounts = accounts;
this.#addresses = addresses;
this.#contracts = contracts;
this.#isEthereum = false;
this._store = new BrowserStore();
}
@@ -49,6 +52,10 @@ export class Base {
return this.#contracts;
}
public get isEthereum (): boolean {
return this.#isEthereum;
}
public get keyring (): KeyringInstance {
if (this.#keyring) {
return this.#keyring;
@@ -117,6 +124,9 @@ export class Base {
this.setDevMode(options.isDevelopment);
}
// set Ethereum state
this.#isEthereum = keyring.type === 'ethereum';
this.#keyring = keyring;
this._genesisHash = options.genesisHash && (
isString(options.genesisHash)