aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--app/scripts/lib/config-manager.js8
-rw-r--r--app/scripts/metamask-controller.js2
-rw-r--r--ui/app/reducers/metamask.js3
3 files changed, 9 insertions, 4 deletions
diff --git a/app/scripts/lib/config-manager.js b/app/scripts/lib/config-manager.js
index 727cd46fc..3d84edfd0 100644
--- a/app/scripts/lib/config-manager.js
+++ b/app/scripts/lib/config-manager.js
@@ -274,9 +274,13 @@ ConfigManager.prototype.getConfirmed = function () {
return ('isConfirmed' in data) && data.isConfirmed
}
-ConfigManager.prototype.setShouldntShowWarning = function (confirmed) {
+ConfigManager.prototype.setShouldntShowWarning = function () {
var data = this.getData()
- data.isEthConfirmed = confirmed
+ if (data.isEthConfirmed) {
+ data.isEthConfirmed = !data.isEthConfirmed
+ } else {
+ data.isEthConfirmed = true
+ }
this.setData(data)
}
diff --git a/app/scripts/metamask-controller.js b/app/scripts/metamask-controller.js
index dd43ac2fc..e7e96a472 100644
--- a/app/scripts/metamask-controller.js
+++ b/app/scripts/metamask-controller.js
@@ -243,7 +243,7 @@ module.exports = class MetamaskController {
agreeToEthWarning (cb) {
try {
- this.configManager.setShouldntShowWarning(true)
+ this.configManager.setShouldntShowWarning()
cb()
} catch (e) {
cb(e)
diff --git a/ui/app/reducers/metamask.js b/ui/app/reducers/metamask.js
index 8d4520fb1..4eef20f56 100644
--- a/ui/app/reducers/metamask.js
+++ b/ui/app/reducers/metamask.js
@@ -10,6 +10,7 @@ function reduceMetamask (state, action) {
var metamaskState = extend({
isInitialized: false,
isUnlocked: false,
+ isEthConfirmed: false,
currentDomain: 'example.com',
rpcTarget: 'https://rawtestrpc.metamask.io/',
identities: {},
@@ -33,7 +34,7 @@ function reduceMetamask (state, action) {
case actions.AGREE_TO_ETH_WARNING:
return extend(metamaskState, {
- isEthConfirmed: true,
+ isEthConfirmed: !metamaskState.isEthConfirmed,
})
case actions.UNLOCK_METAMASK: