aboutsummaryrefslogtreecommitdiffstats
path: root/app/scripts
diff options
context:
space:
mode:
authorDan J Miller <danjm.com@gmail.com>2018-02-08 08:38:55 +0800
committerGitHub <noreply@github.com>2018-02-08 08:38:55 +0800
commit7f151b861cc3a565d3feefc50b3be25ab4490ac8 (patch)
tree4b0ec57e7fb316ff835748e0cabda8c2012b6345 /app/scripts
parent9db0a32dac81ad071f3c15651ce5fb830d2ddf4a (diff)
downloadtangerine-wallet-browser-7f151b861cc3a565d3feefc50b3be25ab4490ac8.tar
tangerine-wallet-browser-7f151b861cc3a565d3feefc50b3be25ab4490ac8.tar.gz
tangerine-wallet-browser-7f151b861cc3a565d3feefc50b3be25ab4490ac8.tar.bz2
tangerine-wallet-browser-7f151b861cc3a565d3feefc50b3be25ab4490ac8.tar.lz
tangerine-wallet-browser-7f151b861cc3a565d3feefc50b3be25ab4490ac8.tar.xz
tangerine-wallet-browser-7f151b861cc3a565d3feefc50b3be25ab4490ac8.tar.zst
tangerine-wallet-browser-7f151b861cc3a565d3feefc50b3be25ab4490ac8.zip
[NewUI] Opens to full screen when restoring from seed. (#3201)
* Opens to full screen when restoring from seed. * Remove redundant parameter in actions.markPasswordForgotten call.
Diffstat (limited to 'app/scripts')
-rw-r--r--app/scripts/lib/config-manager.js11
-rw-r--r--app/scripts/metamask-controller.js15
2 files changed, 26 insertions, 0 deletions
diff --git a/app/scripts/lib/config-manager.js b/app/scripts/lib/config-manager.js
index 9c0dffe9c..34b603b96 100644
--- a/app/scripts/lib/config-manager.js
+++ b/app/scripts/lib/config-manager.js
@@ -42,6 +42,17 @@ ConfigManager.prototype.getData = function () {
return this.store.getState()
}
+ConfigManager.prototype.setPasswordForgotten = function (passwordForgottenState) {
+ const data = this.getData()
+ data.forgottenPassword = passwordForgottenState
+ this.setData(data)
+}
+
+ConfigManager.prototype.getPasswordForgotten = function (passwordForgottenState) {
+ const data = this.getData()
+ return data.forgottenPassword
+}
+
ConfigManager.prototype.setWallet = function (wallet) {
var data = this.getData()
data.wallet = wallet
diff --git a/app/scripts/metamask-controller.js b/app/scripts/metamask-controller.js
index 962516af6..cb671ec3c 100644
--- a/app/scripts/metamask-controller.js
+++ b/app/scripts/metamask-controller.js
@@ -315,6 +315,7 @@ module.exports = class MetamaskController extends EventEmitter {
{
lostAccounts: this.configManager.getLostAccounts(),
seedWords: this.configManager.getSeedWords(),
+ forgottenPassword: this.configManager.getPasswordForgotten(),
}
)
}
@@ -337,6 +338,8 @@ module.exports = class MetamaskController extends EventEmitter {
setCurrentCurrency: this.setCurrentCurrency.bind(this),
setUseBlockie: this.setUseBlockie.bind(this),
markAccountsFound: this.markAccountsFound.bind(this),
+ markPasswordForgotten: this.markPasswordForgotten.bind(this),
+ unMarkPasswordForgotten: this.unMarkPasswordForgotten.bind(this),
// coinbase
buyEth: this.buyEth.bind(this),
@@ -791,6 +794,18 @@ module.exports = class MetamaskController extends EventEmitter {
cb(null, this.getState())
}
+ markPasswordForgotten(cb) {
+ this.configManager.setPasswordForgotten(true)
+ this.sendUpdate()
+ cb()
+ }
+
+ unMarkPasswordForgotten(cb) {
+ this.configManager.setPasswordForgotten(false)
+ this.sendUpdate()
+ cb()
+ }
+
restoreOldVaultAccounts (migratorOutput) {
const { serialized } = migratorOutput
return this.keyringController.restoreKeyring(serialized)