aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/actions.js
diff options
context:
space:
mode:
authorDan <danjm.com@gmail.com>2017-11-09 00:44:48 +0800
committerChi Kei Chan <chikeichan@gmail.com>2017-11-15 08:18:00 +0800
commit34ca7290c593d6fb27faa98a660c8c0bca7e1457 (patch)
treef93506b3d2ab9b114b111fab2cb12ca6eeb317b8 /ui/app/actions.js
parent7eb083bd9f1a8ce0e9c3e83e8b6bfb4d5a7b59cc (diff)
downloadtangerine-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/actions.js')
-rw-r--r--ui/app/actions.js21
1 files changed, 21 insertions, 0 deletions
diff --git a/ui/app/actions.js b/ui/app/actions.js
index 93cd40ed6..0d7f03d0e 100644
--- a/ui/app/actions.js
+++ b/ui/app/actions.js
@@ -115,6 +115,7 @@ var actions = {
TRANSACTION_ERROR: 'TRANSACTION_ERROR',
NEXT_TX: 'NEXT_TX',
PREVIOUS_TX: 'PREV_TX',
+ EDIT_TX: 'EDIT_TX',
signMsg: signMsg,
cancelMsg: cancelMsg,
signPersonalMsg,
@@ -129,10 +130,13 @@ var actions = {
completedTx: completedTx,
txError: txError,
nextTx: nextTx,
+ editTx,
previousTx: previousTx,
cancelAllTx: cancelAllTx,
viewPendingTx: viewPendingTx,
VIEW_PENDING_TX: 'VIEW_PENDING_TX',
+ updateTransactionParams,
+ UPDATE_TRANSACTION_PARAMS: 'UPDATE_TRANSACTION_PARAMS',
// send screen
estimateGas,
getGasPrice,
@@ -668,6 +672,8 @@ function updateAndApproveTx (txData) {
log.debug(`actions calling background.updateAndApproveTx`)
background.updateAndApproveTransaction(txData, (err) => {
dispatch(actions.hideLoadingIndication())
+ dispatch(actions.updateTransactionParams(txData.id, txData.txParams))
+ dispatch(actions.clearSend())
if (err) {
dispatch(actions.txError(err))
dispatch(actions.goHome())
@@ -685,6 +691,14 @@ function completedTx (id) {
}
}
+function updateTransactionParams (id, txParams) {
+ return {
+ type: actions.UPDATE_TRANSACTION_PARAMS,
+ id,
+ value: txParams,
+ }
+}
+
function txError (err) {
return {
type: actions.TRANSACTION_ERROR,
@@ -948,6 +962,13 @@ function previousTx () {
}
}
+function editTx (txId) {
+ return {
+ type: actions.EDIT_TX,
+ value: txId,
+ }
+}
+
function showConfigPage (transitionForward = true) {
return {
type: actions.SHOW_CONFIG_PAGE,