mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
Merge pull request #528 from MetaMask/checkout-fix
Fix ether warning checkbox to reflect proper behavior.
This commit is contained in:
commit
c48b60d7a6
@ -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)
|
||||
}
|
||||
|
||||
|
@ -243,7 +243,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…
Reference in New Issue
Block a user