diff options
author | Dan <danjm.com@gmail.com> | 2017-11-09 00:44:48 +0800 |
---|---|---|
committer | Chi Kei Chan <chikeichan@gmail.com> | 2017-11-15 08:18:00 +0800 |
commit | 34ca7290c593d6fb27faa98a660c8c0bca7e1457 (patch) | |
tree | f93506b3d2ab9b114b111fab2cb12ca6eeb317b8 /ui/app/reducers | |
parent | 7eb083bd9f1a8ce0e9c3e83e8b6bfb4d5a7b59cc (diff) | |
download | tangerine-wallet-browser-34ca7290c593d6fb27faa98a660c8c0bca7e1457.tar tangerine-wallet-browser-34ca7290c593d6fb27faa98a660c8c0bca7e1457.tar.gz tangerine-wallet-browser-34ca7290c593d6fb27faa98a660c8c0bca7e1457.tar.bz2 tangerine-wallet-browser-34ca7290c593d6fb27faa98a660c8c0bca7e1457.tar.lz tangerine-wallet-browser-34ca7290c593d6fb27faa98a660c8c0bca7e1457.tar.xz tangerine-wallet-browser-34ca7290c593d6fb27faa98a660c8c0bca7e1457.tar.zst tangerine-wallet-browser-34ca7290c593d6fb27faa98a660c8c0bca7e1457.zip |
Allow editing of send ether.
Diffstat (limited to 'ui/app/reducers')
-rw-r--r-- | ui/app/reducers/metamask.js | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/ui/app/reducers/metamask.js b/ui/app/reducers/metamask.js index 3b93a1625..bc0d0a4b3 100644 --- a/ui/app/reducers/metamask.js +++ b/ui/app/reducers/metamask.js @@ -33,6 +33,7 @@ function reduceMetamask (state, action) { amount: '0x0', memo: '', errors: {}, + editingTransactionId: null, }, coinOptions: {}, }, state.metamask) @@ -108,6 +109,14 @@ function reduceMetamask (state, action) { } return newState + case actions.EDIT_TX: + return extend(metamaskState, { + send: { + ...metamaskState.send, + editingTransactionId: action.value, + }, + }) + case actions.SHOW_NEW_VAULT_SEED: return extend(metamaskState, { isUnlocked: true, @@ -262,6 +271,20 @@ function reduceMetamask (state, action) { }, }) + case actions.UPDATE_TRANSACTION_PARAMS: + const { id, value } = action + let { selectedAddressTxList } = metamaskState + selectedAddressTxList = selectedAddressTxList.map(tx => { + if (tx.id === id) { + tx.txParams = value + } + return tx + }) + + return extend(metamaskState, { + selectedAddressTxList, + }) + case actions.PAIR_UPDATE: const { value: { marketinfo: pairMarketInfo } } = action return extend(metamaskState, { |