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 return ('isConfirmed' in data) && data.isConfirmed
} }
ConfigManager.prototype.setShouldntShowWarning = function (confirmed) { ConfigManager.prototype.setShouldntShowWarning = function () {
var data = this.getData() var data = this.getData()
data.isEthConfirmed = confirmed if (data.isEthConfirmed) {
data.isEthConfirmed = !data.isEthConfirmed
} else {
data.isEthConfirmed = true
}
this.setData(data) this.setData(data)
} }

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

@ -10,6 +10,7 @@ function reduceMetamask (state, action) {
var metamaskState = extend({ var metamaskState = extend({
isInitialized: false, isInitialized: false,
isUnlocked: false, isUnlocked: false,
isEthConfirmed: false,
currentDomain: 'example.com', currentDomain: 'example.com',
rpcTarget: 'https://rawtestrpc.metamask.io/', rpcTarget: 'https://rawtestrpc.metamask.io/',
identities: {}, identities: {},
@ -33,7 +34,7 @@ function reduceMetamask (state, action) {
case actions.AGREE_TO_ETH_WARNING: case actions.AGREE_TO_ETH_WARNING:
return extend(metamaskState, { return extend(metamaskState, {
isEthConfirmed: true, isEthConfirmed: !metamaskState.isEthConfirmed,
}) })
case actions.UNLOCK_METAMASK: case actions.UNLOCK_METAMASK:

Loading…
Cancel
Save