diff options
Diffstat (limited to 'ui/app/reducers/metamask.js')
-rw-r--r-- | ui/app/reducers/metamask.js | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/ui/app/reducers/metamask.js b/ui/app/reducers/metamask.js index cdc98d05e..e78f51f3a 100644 --- a/ui/app/reducers/metamask.js +++ b/ui/app/reducers/metamask.js @@ -19,6 +19,8 @@ function reduceMetamask (state, action) { addressBook: [], selectedTokenAddress: null, tokenExchangeRates: {}, + estimatedGas: null, + blockGasPrice: null, }, state.metamask) switch (action.type) { @@ -74,6 +76,26 @@ function reduceMetamask (state, action) { }, }) + case actions.UPDATE_GAS_ESTIMATE: + return extend(metamaskState, { + estimatedGas: action.value, + }) + + case actions.UPDATE_GAS_PRICE: + return extend(metamaskState, { + blockGasPrice: action.value, + }) + + case actions.CLEAR_GAS_ESTIMATE: + return extend(metamaskState, { + estimatedGas: null, + }) + + case actions.CLEAR_GAS_PRICE: + return extend(metamaskState, { + blockGasPrice: null, + }) + case actions.COMPLETED_TX: var stringId = String(action.id) newState = extend(metamaskState, { |