aboutsummaryrefslogtreecommitdiffstats
path: root/app/scripts
diff options
context:
space:
mode:
authorBruno <brunobar79@gmail.com>2018-06-11 09:10:22 +0800
committerBruno <brunobar79@gmail.com>2018-06-11 09:10:22 +0800
commitd1880073f678dbdc52e07e62ec66c39eea5062a6 (patch)
tree9c02b9ee29994bd42a17e6681b9bbc88b04bdfd0 /app/scripts
parentf6b27fa9eb542c1ac3fabdad9285e1a50baee7dc (diff)
downloadtangerine-wallet-browser-d1880073f678dbdc52e07e62ec66c39eea5062a6.tar
tangerine-wallet-browser-d1880073f678dbdc52e07e62ec66c39eea5062a6.tar.gz
tangerine-wallet-browser-d1880073f678dbdc52e07e62ec66c39eea5062a6.tar.bz2
tangerine-wallet-browser-d1880073f678dbdc52e07e62ec66c39eea5062a6.tar.lz
tangerine-wallet-browser-d1880073f678dbdc52e07e62ec66c39eea5062a6.tar.xz
tangerine-wallet-browser-d1880073f678dbdc52e07e62ec66c39eea5062a6.tar.zst
tangerine-wallet-browser-d1880073f678dbdc52e07e62ec66c39eea5062a6.zip
balances working
Diffstat (limited to 'app/scripts')
-rw-r--r--app/scripts/lib/trezorKeyring.js3
-rw-r--r--app/scripts/metamask-controller.js5
2 files changed, 4 insertions, 4 deletions
diff --git a/app/scripts/lib/trezorKeyring.js b/app/scripts/lib/trezorKeyring.js
index cf7436a44..fb029f82a 100644
--- a/app/scripts/lib/trezorKeyring.js
+++ b/app/scripts/lib/trezorKeyring.js
@@ -8,7 +8,7 @@ const keyringType = 'Trezor Hardware'
const TrezorConnect = require('./trezor-connect.js')
const HDKey = require('hdkey')
const TREZOR_FIRMWARE_VERSION = '1.4.0'
-//const log = require('loglevel')
+const log = require('loglevel')
class TrezorKeyring extends EventEmitter {
constructor (opts = {}) {
@@ -111,6 +111,7 @@ class TrezorKeyring extends EventEmitter {
index: i,
})
}
+ log.debug(accounts)
resolve(accounts)
})
.catch(e => {
diff --git a/app/scripts/metamask-controller.js b/app/scripts/metamask-controller.js
index 3cb77b35a..daab5baa5 100644
--- a/app/scripts/metamask-controller.js
+++ b/app/scripts/metamask-controller.js
@@ -549,10 +549,10 @@ module.exports = class MetamaskController extends EventEmitter {
throw new Error('MetamaskController - No Trezor Hardware Keyring found')
}
- const accounts = page === -1 ? await keyring.getPrevAccountSet() : await keyring.getNextAccountSet()
+ const accounts = page === -1 ? await keyring.getPrevAccountSet(this.provider) : await keyring.getNextAccountSet(this.provider)
+ this.accountTracker.syncWithAddresses(accounts.map(a => a.address))
return accounts
-
}
/**
@@ -570,7 +570,6 @@ module.exports = class MetamaskController extends EventEmitter {
}
keyring.setAccountToUnlock(index)
-
const oldAccounts = await keyringController.getAccounts()
const keyState = await keyringController.addNewAccount(keyring)
const newAccounts = await keyringController.getAccounts()