From 9b89ac19ba45274c3d2d88f6aad6763dc416b8b5 Mon Sep 17 00:00:00 2001 From: Jaco Greeff Date: Wed, 11 Nov 2020 17:45:46 +0100 Subject: [PATCH] catch, ignore --- packages/ui-keyring/src/Keyring.ts | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/packages/ui-keyring/src/Keyring.ts b/packages/ui-keyring/src/Keyring.ts index 6fb358cc..05e1993e 100644 --- a/packages/ui-keyring/src/Keyring.ts +++ b/packages/ui-keyring/src/Keyring.ts @@ -261,14 +261,18 @@ export class Keyring extends Base implements KeyringStruct { this._store.all((key: string, json: KeyringJson): void => { if (options.filter ? options.filter(json) : true) { - if (this.allowGenesis(json)) { - if (accountRegex.test(key)) { - this.loadAccount(json, key); - } else if (addressRegex.test(key)) { - this.loadAddress(json, key); - } else if (contractRegex.test(key)) { - this.loadContract(json, key); + try { + if (this.allowGenesis(json)) { + if (accountRegex.test(key)) { + this.loadAccount(json, key); + } else if (addressRegex.test(key)) { + this.loadAddress(json, key); + } else if (contractRegex.test(key)) { + this.loadContract(json, key); + } } + } catch (error) { + // ignore } } }); @@ -278,7 +282,7 @@ export class Keyring extends Base implements KeyringStruct { try { this.loadInjected(account.address, account.meta); } catch (error) { - console.warn(`Failed loading ${account.address}`); + // ignore } } });