aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/actions.js
diff options
context:
space:
mode:
authorChi Kei Chan <chikeichan@gmail.com>2017-12-21 09:38:28 +0800
committerGitHub <noreply@github.com>2017-12-21 09:38:28 +0800
commit9959aea5987a123209c962632d54e503f1d458a5 (patch)
treecdb705c11731a59d59b8015918b260a07f159f8b /ui/app/actions.js
parent7915e62d65de1bbc3419cba58f69e6d55a4df3ea (diff)
parente7e1b7a95180597308bd167bd4a152bbbf53ff21 (diff)
downloadtangerine-wallet-browser-9959aea5987a123209c962632d54e503f1d458a5.tar
tangerine-wallet-browser-9959aea5987a123209c962632d54e503f1d458a5.tar.gz
tangerine-wallet-browser-9959aea5987a123209c962632d54e503f1d458a5.tar.bz2
tangerine-wallet-browser-9959aea5987a123209c962632d54e503f1d458a5.tar.lz
tangerine-wallet-browser-9959aea5987a123209c962632d54e503f1d458a5.tar.xz
tangerine-wallet-browser-9959aea5987a123209c962632d54e503f1d458a5.tar.zst
tangerine-wallet-browser-9959aea5987a123209c962632d54e503f1d458a5.zip
Merge branch 'NewUI-flat' into merge-master-to-newUI-flat-dec20
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 279cb892b..e8271c9a7 100644
--- a/ui/app/actions.js
+++ b/ui/app/actions.js
@@ -125,6 +125,7 @@ var actions = {
sendTx: sendTx,
signTx: signTx,
signTokenTx: signTokenTx,
+ updateTransaction,
updateAndApproveTx,
cancelTx: cancelTx,
completedTx: completedTx,
@@ -694,6 +695,23 @@ function signTokenTx (tokenAddress, toAddress, amount, txData) {
}
}
+function updateTransaction (txData) {
+ log.info('actions: updateTx: ' + JSON.stringify(txData))
+ return (dispatch) => {
+ log.debug(`actions calling background.updateTx`)
+ background.updateTransaction(txData, (err) => {
+ dispatch(actions.hideLoadingIndication())
+ dispatch(actions.updateTransactionParams(txData.id, txData.txParams))
+ if (err) {
+ dispatch(actions.txError(err))
+ dispatch(actions.goHome())
+ return log.error(err.message)
+ }
+ dispatch(actions.showConfTxPage({ id: txData.id }))
+ })
+ }
+}
+
function updateAndApproveTx (txData) {
log.info('actions: updateAndApproveTx: ' + JSON.stringify(txData))
return (dispatch) => {
@@ -756,6 +774,7 @@ function cancelTx (txData) {
return (dispatch) => {
log.debug(`background.cancelTransaction`)
background.cancelTransaction(txData.id, () => {
+ dispatch(actions.clearSend())
dispatch(actions.completedTx(txData.id))
})
}