aboutsummaryrefslogtreecommitdiffstats
path: root/app/scripts/metamask-controller.js
diff options
context:
space:
mode:
authorDan Finlay <dan@danfinlay.com>2018-06-07 07:46:39 +0800
committerDan Finlay <dan@danfinlay.com>2018-06-07 07:46:39 +0800
commitc53c5d5c9e2a384c6b0a17b844919f9fff9f960e (patch)
tree6aceb8b7ef83a573776fceadbc65300815ace182 /app/scripts/metamask-controller.js
parentaea9491f6a7888bd15a9d3dd7858bcda16f1e532 (diff)
downloadtangerine-wallet-browser-c53c5d5c9e2a384c6b0a17b844919f9fff9f960e.tar
tangerine-wallet-browser-c53c5d5c9e2a384c6b0a17b844919f9fff9f960e.tar.gz
tangerine-wallet-browser-c53c5d5c9e2a384c6b0a17b844919f9fff9f960e.tar.bz2
tangerine-wallet-browser-c53c5d5c9e2a384c6b0a17b844919f9fff9f960e.tar.lz
tangerine-wallet-browser-c53c5d5c9e2a384c6b0a17b844919f9fff9f960e.tar.xz
tangerine-wallet-browser-c53c5d5c9e2a384c6b0a17b844919f9fff9f960e.tar.zst
tangerine-wallet-browser-c53c5d5c9e2a384c6b0a17b844919f9fff9f960e.zip
Fix bug where reset account would not work.
Fixes #4462 Ensures that resetAccount() can work on non-stock providers. I'm unclear how this was ever working, this code hasn't moved in months, but users report it recently breaking. Maybe we only recently pushed it to prod.
Diffstat (limited to 'app/scripts/metamask-controller.js')
-rw-r--r--app/scripts/metamask-controller.js5
1 files changed, 1 insertions, 4 deletions
diff --git a/app/scripts/metamask-controller.js b/app/scripts/metamask-controller.js
index 1bb0af5ee..873ba7995 100644
--- a/app/scripts/metamask-controller.js
+++ b/app/scripts/metamask-controller.js
@@ -628,10 +628,7 @@ module.exports = class MetamaskController extends EventEmitter {
async resetAccount () {
const selectedAddress = this.preferencesController.getSelectedAddress()
this.txController.wipeTransactions(selectedAddress)
-
- const networkController = this.networkController
- const oldType = networkController.getProviderConfig().type
- await networkController.setProviderType(oldType, true)
+ this.networkController.resetConnection()
return selectedAddress
}