aboutsummaryrefslogtreecommitdiffstats
path: root/app/scripts
diff options
context:
space:
mode:
authorkumavis <aaron@kumavis.me>2018-08-23 02:23:54 +0800
committerkumavis <aaron@kumavis.me>2018-08-23 02:23:54 +0800
commitcb0af67f743d242afa3bdb518847f77d3c2cc260 (patch)
tree012dfb96beba7594e8dffa6dd696f396d2cc3422 /app/scripts
parentbabd59a2dc64e15ef2a415e349ef12d5b995e2e7 (diff)
downloadtangerine-wallet-browser-cb0af67f743d242afa3bdb518847f77d3c2cc260.tar
tangerine-wallet-browser-cb0af67f743d242afa3bdb518847f77d3c2cc260.tar.gz
tangerine-wallet-browser-cb0af67f743d242afa3bdb518847f77d3c2cc260.tar.bz2
tangerine-wallet-browser-cb0af67f743d242afa3bdb518847f77d3c2cc260.tar.lz
tangerine-wallet-browser-cb0af67f743d242afa3bdb518847f77d3c2cc260.tar.xz
tangerine-wallet-browser-cb0af67f743d242afa3bdb518847f77d3c2cc260.tar.zst
tangerine-wallet-browser-cb0af67f743d242afa3bdb518847f77d3c2cc260.zip
metamask controller - force account tracker to update balances on network change
Diffstat (limited to 'app/scripts')
-rw-r--r--app/scripts/metamask-controller.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/app/scripts/metamask-controller.js b/app/scripts/metamask-controller.js
index 29838ad2d..1e2df6368 100644
--- a/app/scripts/metamask-controller.js
+++ b/app/scripts/metamask-controller.js
@@ -127,6 +127,10 @@ module.exports = class MetamaskController extends EventEmitter {
provider: this.provider,
blockTracker: this.blockTracker,
})
+ // ensure accountTracker updates balances after network change
+ this.networkController.on('networkDidChange', () => {
+ this.accountTracker._updateAccounts()
+ })
// key mgmt
const additionalKeyrings = [TrezorKeyring, LedgerBridgeKeyring]