diff options
author | Dan <danjm.com@gmail.com> | 2017-11-10 11:49:16 +0800 |
---|---|---|
committer | Chi Kei Chan <chikeichan@gmail.com> | 2017-11-15 08:18:00 +0800 |
commit | 9e3f921ba928a948c04b4156daa0a3f752ee2dde (patch) | |
tree | 61879e2bdcf2250e1c8ee7798e78df001f2ca3f0 /ui/app/reducers | |
parent | 4671f28476165fec43785ae23352c1e9a0776abc (diff) | |
download | tangerine-wallet-browser-9e3f921ba928a948c04b4156daa0a3f752ee2dde.tar tangerine-wallet-browser-9e3f921ba928a948c04b4156daa0a3f752ee2dde.tar.gz tangerine-wallet-browser-9e3f921ba928a948c04b4156daa0a3f752ee2dde.tar.bz2 tangerine-wallet-browser-9e3f921ba928a948c04b4156daa0a3f752ee2dde.tar.lz tangerine-wallet-browser-9e3f921ba928a948c04b4156daa0a3f752ee2dde.tar.xz tangerine-wallet-browser-9e3f921ba928a948c04b4156daa0a3f752ee2dde.tar.zst tangerine-wallet-browser-9e3f921ba928a948c04b4156daa0a3f752ee2dde.zip |
Create single action for updating all of send in redux state.
Diffstat (limited to 'ui/app/reducers')
-rw-r--r-- | ui/app/reducers/metamask.js | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/ui/app/reducers/metamask.js b/ui/app/reducers/metamask.js index 56bf1fba6..83161320e 100644 --- a/ui/app/reducers/metamask.js +++ b/ui/app/reducers/metamask.js @@ -257,17 +257,27 @@ function reduceMetamask (state, action) { }, }) + case actions.UPDATE_SEND: + return extend(metamaskState, { + send: { + ...metamaskState.send, + ...action.value, + }, + }) + case actions.CLEAR_SEND: return extend(metamaskState, { send: { gasLimit: null, gasPrice: null, gasTotal: null, + tokenBalance: null, from: '', to: '', amount: '0x0', memo: '', errors: {}, + editingTransactionId: null, }, }) |