aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/actions.js
diff options
context:
space:
mode:
authorDan <danjm.com@gmail.com>2017-12-19 22:46:11 +0800
committerChi Kei Chan <chikeichan@gmail.com>2017-12-21 09:37:18 +0800
commit1f1fc2c49ecbb5c6a0a1d925d5c02cf48f795b2f (patch)
tree0f955a1491de5363cf49e5b6c6ccafdd1c058d64 /ui/app/actions.js
parentbccbf14b39ab2b1670c9c30b276404fe4f949cd7 (diff)
downloadtangerine-wallet-browser-1f1fc2c49ecbb5c6a0a1d925d5c02cf48f795b2f.tar
tangerine-wallet-browser-1f1fc2c49ecbb5c6a0a1d925d5c02cf48f795b2f.tar.gz
tangerine-wallet-browser-1f1fc2c49ecbb5c6a0a1d925d5c02cf48f795b2f.tar.bz2
tangerine-wallet-browser-1f1fc2c49ecbb5c6a0a1d925d5c02cf48f795b2f.tar.lz
tangerine-wallet-browser-1f1fc2c49ecbb5c6a0a1d925d5c02cf48f795b2f.tar.xz
tangerine-wallet-browser-1f1fc2c49ecbb5c6a0a1d925d5c02cf48f795b2f.tar.zst
tangerine-wallet-browser-1f1fc2c49ecbb5c6a0a1d925d5c02cf48f795b2f.zip
Canceled, edited transactions show edited amount.
Diffstat (limited to 'ui/app/actions.js')
-rw-r--r--ui/app/actions.js19
1 files changed, 19 insertions, 0 deletions
diff --git a/ui/app/actions.js b/ui/app/actions.js
index e694152a2..9d3d7184e 100644
--- a/ui/app/actions.js
+++ b/ui/app/actions.js
@@ -126,6 +126,7 @@ var actions = {
signTx: signTx,
signTokenTx: signTokenTx,
updateAndApproveTx,
+ updateAndCancelTx,
cancelTx: cancelTx,
completedTx: completedTx,
txError: txError,
@@ -710,6 +711,24 @@ function updateAndApproveTx (txData) {
}
}
+function updateAndCancelTx (txData) {
+ log.info('actions: updateAndCancelTx: ' + JSON.stringify(txData))
+ return (dispatch) => {
+ log.debug(`actions calling background.updateAndCancelTx`)
+ background.updateAndCancelTransaction(txData, (err) => {
+ dispatch(actions.hideLoadingIndication())
+ dispatch(actions.updateTransactionParams(txData.id, txData.txParams))
+ dispatch(actions.clearSend())
+ if (err) {
+ dispatch(actions.txError(err))
+ dispatch(actions.goHome())
+ return log.error(err.message)
+ }
+ dispatch(actions.completedTx(txData.id))
+ })
+ }
+}
+
function completedTx (id) {
return {
type: actions.COMPLETED_TX,