diff options
Merge branch 'master' into SignFullDataNotHash
Diffstat (limited to 'app/scripts')
-rw-r--r-- | app/scripts/background.js | 10 | ||||
-rw-r--r-- | app/scripts/lib/config-manager.js | 11 | ||||
-rw-r--r-- | app/scripts/lib/idStore.js | 1 |
3 files changed, 22 insertions, 0 deletions
diff --git a/app/scripts/background.js b/app/scripts/background.js index f64209ecc..1098efe87 100644 --- a/app/scripts/background.js +++ b/app/scripts/background.js @@ -188,6 +188,7 @@ function setupControllerConnection(stream){ setRpcTarget: setRpcTarget, setProviderType: setProviderType, useEtherscanProvider: useEtherscanProvider, + agreeToDisclaimer: agreeToDisclaimer, // forward directly to idStore createNewVault: idStore.createNewVault.bind(idStore), recoverFromSeed: idStore.recoverFromSeed.bind(idStore), @@ -295,6 +296,15 @@ function addUnconfirmedMsg(msgParams, cb){ // config // +function agreeToDisclaimer(cb) { + try { + configManager.setConfirmed(true) + cb() + } catch (e) { + cb(e) + } +} + // called from popup function setRpcTarget(rpcTarget){ configManager.setRpcTarget(rpcTarget) diff --git a/app/scripts/lib/config-manager.js b/app/scripts/lib/config-manager.js index f5e1cf38d..24571748f 100644 --- a/app/scripts/lib/config-manager.js +++ b/app/scripts/lib/config-manager.js @@ -270,6 +270,17 @@ ConfigManager.prototype._emitUpdates = function(state){ }) } +ConfigManager.prototype.setConfirmed = function(confirmed) { + var data = this.getData() + data.isConfirmed = confirmed + this.setData(data) +} + +ConfigManager.prototype.getConfirmed = function() { + var data = this.getData() + return ('isConfirmed' in data) && data.isConfirmed +} + function loadData() { diff --git a/app/scripts/lib/idStore.js b/app/scripts/lib/idStore.js index 68a38bc0b..61b9a4455 100644 --- a/app/scripts/lib/idStore.js +++ b/app/scripts/lib/idStore.js @@ -93,6 +93,7 @@ IdentityStore.prototype.getState = function(){ isInitialized: !!configManager.getWallet() && !seedWords, isUnlocked: this._isUnlocked(), seedWords: seedWords, + isConfirmed: configManager.getConfirmed(), unconfTxs: configManager.unconfirmedTxs(), transactions: configManager.getTxList(), unconfMsgs: messageManager.unconfirmedMsgs(), |