mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
Fix ether warning checkbox.
This commit is contained in:
parent
106cbc133f
commit
abfc5632ef
@ -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)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -243,7 +243,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…
Reference in New Issue
Block a user