Merge branch 'master' into logging-fix

feature/default_network_editable
Kevin Serrano 8 years ago
commit ad468c1880
  1. 8
      app/scripts/lib/config-manager.js
  2. 2
      app/scripts/metamask-controller.js
  3. 3
      ui/app/reducers/metamask.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)
}

@ -246,7 +246,7 @@ module.exports = class MetamaskController {
agreeToEthWarning (cb) {
try {
this.configManager.setShouldntShowWarning(true)
this.configManager.setShouldntShowWarning()
cb()
} catch (e) {
cb(e)

@ -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:

Loading…
Cancel
Save