diff options
author | brunobar79 <brunobar79@gmail.com> | 2018-06-23 14:52:11 +0800 |
---|---|---|
committer | brunobar79 <brunobar79@gmail.com> | 2018-06-23 14:52:11 +0800 |
commit | 87dfca07676f7a4745f68d2331a78f3ae53c558f (patch) | |
tree | 52e3a25b99f5ad2fd7074612ce1887296e13001e /app/scripts | |
parent | 4381d3e71db3a96cda7532bbd83e5755debcf33b (diff) | |
download | tangerine-wallet-browser-87dfca07676f7a4745f68d2331a78f3ae53c558f.tar tangerine-wallet-browser-87dfca07676f7a4745f68d2331a78f3ae53c558f.tar.gz tangerine-wallet-browser-87dfca07676f7a4745f68d2331a78f3ae53c558f.tar.bz2 tangerine-wallet-browser-87dfca07676f7a4745f68d2331a78f3ae53c558f.tar.lz tangerine-wallet-browser-87dfca07676f7a4745f68d2331a78f3ae53c558f.tar.xz tangerine-wallet-browser-87dfca07676f7a4745f68d2331a78f3ae53c558f.tar.zst tangerine-wallet-browser-87dfca07676f7a4745f68d2331a78f3ae53c558f.zip |
fixes
Diffstat (limited to 'app/scripts')
-rw-r--r-- | app/scripts/metamask-controller.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/app/scripts/metamask-controller.js b/app/scripts/metamask-controller.js index c57b643bb..943904e4c 100644 --- a/app/scripts/metamask-controller.js +++ b/app/scripts/metamask-controller.js @@ -539,14 +539,14 @@ module.exports = class MetamaskController extends EventEmitter { switch (deviceName) { case 'trezor': const keyringController = this.keyringController - const keyring = await keyringController.getKeyringsByType( + let keyring = await keyringController.getKeyringsByType( 'Trezor Hardware' )[0] if (!keyring) { - throw new Error('MetamaskController - No Trezor Hardware Keyring found') + keyring = await this.keyringController.addNewKeyring('Trezor Hardware') } - const accounts = await keyring.getPage(page) + const accounts = page === 1 ? await keyring.getNextPage() : await keyring.getPreviousPage() this.accountTracker.syncWithAddresses(accounts.map(a => a.address)) return accounts |