aboutsummaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
authorDan Finlay <dan@danfinlay.com>2016-12-21 05:53:14 +0800
committerDan Finlay <dan@danfinlay.com>2016-12-21 07:24:08 +0800
commit931ae5f64a233b472c3dada8aa6af77e0bffad5e (patch)
treec5223496a95e474d90df1565a858f3715240c274 /app
parent674b2689826c770092a3dfee7fe76fb83c0b444a (diff)
downloadtangerine-wallet-browser-931ae5f64a233b472c3dada8aa6af77e0bffad5e.tar
tangerine-wallet-browser-931ae5f64a233b472c3dada8aa6af77e0bffad5e.tar.gz
tangerine-wallet-browser-931ae5f64a233b472c3dada8aa6af77e0bffad5e.tar.bz2
tangerine-wallet-browser-931ae5f64a233b472c3dada8aa6af77e0bffad5e.tar.lz
tangerine-wallet-browser-931ae5f64a233b472c3dada8aa6af77e0bffad5e.tar.xz
tangerine-wallet-browser-931ae5f64a233b472c3dada8aa6af77e0bffad5e.tar.zst
tangerine-wallet-browser-931ae5f64a233b472c3dada8aa6af77e0bffad5e.zip
Make notices confirmation configurable
- Confirm button will now dismiss the lost accounts array.
Diffstat (limited to 'app')
-rw-r--r--app/scripts/keyring-controller.js1
-rw-r--r--app/scripts/metamask-controller.js17
2 files changed, 16 insertions, 2 deletions
diff --git a/app/scripts/keyring-controller.js b/app/scripts/keyring-controller.js
index 2888e58a9..61ee56638 100644
--- a/app/scripts/keyring-controller.js
+++ b/app/scripts/keyring-controller.js
@@ -114,7 +114,6 @@ module.exports = class KeyringController extends EventEmitter {
conversionDate: this.configManager.getConversionDate(),
keyringTypes: this.keyringTypes.map(krt => krt.type),
identities: this.identities,
- lostAccounts: this.configManager.getLostAccounts(),
}
}
diff --git a/app/scripts/metamask-controller.js b/app/scripts/metamask-controller.js
index 4b8fa4323..edb25d300 100644
--- a/app/scripts/metamask-controller.js
+++ b/app/scripts/metamask-controller.js
@@ -52,7 +52,9 @@ module.exports = class MetamaskController {
this.ethStore.getState(),
this.configManager.getConfig(),
this.keyringController.getState(),
- this.noticeController.getState()
+ this.noticeController.getState(), {
+ lostAccounts: this.configManager.getLostAccounts(),
+ }
)
}
@@ -71,6 +73,7 @@ module.exports = class MetamaskController {
setTOSHash: this.setTOSHash.bind(this),
checkTOSChange: this.checkTOSChange.bind(this),
setGasMultiplier: this.setGasMultiplier.bind(this),
+ markAccountsFound: this.markAccountsFound.bind(this),
// forward directly to keyringController
createNewVaultAndKeychain: nodeify(keyringController.createNewVaultAndKeychain).bind(keyringController),
@@ -410,4 +413,16 @@ module.exports = class MetamaskController {
getStateNetwork () {
return this.state.network
}
+
+ markAccountsFound(cb) {
+ this.configManager.setLostAccounts([])
+ this.keyringController.getAccounts()
+ .then((accounts) => {
+ return this.keyringController.setSelectedAccount(accounts[0])
+ })
+ .then(() => {
+ this.sendUpdate()
+ cb(null, this.getState())
+ })
+ }
}