catch, ignore

This commit is contained in:
Jaco Greeff
2020-11-11 17:45:46 +01:00
parent 1d369c13d8
commit 9b89ac19ba
+5 -1
View File
@@ -261,6 +261,7 @@ export class Keyring extends Base implements KeyringStruct {
this._store.all((key: string, json: KeyringJson): void => { this._store.all((key: string, json: KeyringJson): void => {
if (options.filter ? options.filter(json) : true) { if (options.filter ? options.filter(json) : true) {
try {
if (this.allowGenesis(json)) { if (this.allowGenesis(json)) {
if (accountRegex.test(key)) { if (accountRegex.test(key)) {
this.loadAccount(json, key); this.loadAccount(json, key);
@@ -270,6 +271,9 @@ export class Keyring extends Base implements KeyringStruct {
this.loadContract(json, key); this.loadContract(json, key);
} }
} }
} catch (error) {
// ignore
}
} }
}); });
@@ -278,7 +282,7 @@ export class Keyring extends Base implements KeyringStruct {
try { try {
this.loadInjected(account.address, account.meta); this.loadInjected(account.address, account.meta);
} catch (error) { } catch (error) {
console.warn(`Failed loading ${account.address}`); // ignore
} }
} }
}); });