Merge branch 'master' into logging-fix

This commit is contained in:
Kevin Serrano 2016-08-11 14:07:49 -07:00
commit ad468c1880
3 changed files with 9 additions and 4 deletions

View File

@ -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)
}

View File

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

View File

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