diff options
author | Dan <danjm.com@gmail.com> | 2017-10-13 00:42:14 +0800 |
---|---|---|
committer | Chi Kei Chan <chikeichan@gmail.com> | 2017-10-16 11:09:05 +0800 |
commit | a9244f5e426d6572ef135e07ab75a49c00e84942 (patch) | |
tree | 7aa7e1d98711ffbb2e27eb068b086c13238f421f /ui/app/reducers | |
parent | a59972dcabc56c3d92f09ba1b88a2ded70ce8c34 (diff) | |
download | tangerine-wallet-browser-a9244f5e426d6572ef135e07ab75a49c00e84942.tar tangerine-wallet-browser-a9244f5e426d6572ef135e07ab75a49c00e84942.tar.gz tangerine-wallet-browser-a9244f5e426d6572ef135e07ab75a49c00e84942.tar.bz2 tangerine-wallet-browser-a9244f5e426d6572ef135e07ab75a49c00e84942.tar.lz tangerine-wallet-browser-a9244f5e426d6572ef135e07ab75a49c00e84942.tar.xz tangerine-wallet-browser-a9244f5e426d6572ef135e07ab75a49c00e84942.tar.zst tangerine-wallet-browser-a9244f5e426d6572ef135e07ab75a49c00e84942.zip |
Customize Gas connected to state
Diffstat (limited to 'ui/app/reducers')
-rw-r--r-- | ui/app/reducers/metamask.js | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/ui/app/reducers/metamask.js b/ui/app/reducers/metamask.js index a0884b834..cc24a6729 100644 --- a/ui/app/reducers/metamask.js +++ b/ui/app/reducers/metamask.js @@ -20,6 +20,10 @@ function reduceMetamask (state, action) { selectedTokenAddress: null, tokenExchangeRates: {}, tokens: [], + send: { + gasLimit: null, + gasPrice: null, + }, }, state.metamask) switch (action.type) { @@ -152,6 +156,22 @@ function reduceMetamask (state, action) { tokens: action.newTokens, }) + case actions.UPDATE_GAS_LIMIT: + return extend(metamaskState, { + send: { + ...metamaskState.send, + gasLimit: action.value, + }, + }) + + case actions.UPDATE_GAS_PRICE: + return extend(metamaskState, { + send: { + ...metamaskState.send, + gasPrice: action.value, + }, + }) + default: return metamaskState |