diff options
author | Kevin Serrano <kevin.serrano@consensys.net> | 2017-09-14 23:35:48 +0800 |
---|---|---|
committer | Kevin Serrano <kevin.serrano@consensys.net> | 2017-09-14 23:35:48 +0800 |
commit | cb8856597cb650e282e7209f43547a5f9328de28 (patch) | |
tree | 842b64aea519c7041bc4fbf2a6f31f5d17f57cb8 /ui/app/actions.js | |
parent | 162aedb30b94890935658921b0dd399f43d6cd65 (diff) | |
parent | 1d3cd9768cdd372d02e7e34674dde9d86af536f5 (diff) | |
download | tangerine-wallet-browser-cb8856597cb650e282e7209f43547a5f9328de28.tar.gz tangerine-wallet-browser-cb8856597cb650e282e7209f43547a5f9328de28.tar.zst tangerine-wallet-browser-cb8856597cb650e282e7209f43547a5f9328de28.zip |
Merge branch 'master' into new-currency-test
Diffstat (limited to 'ui/app/actions.js')
-rw-r--r-- | ui/app/actions.js | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/ui/app/actions.js b/ui/app/actions.js index eebe65ba2..e793e6a21 100644 --- a/ui/app/actions.js +++ b/ui/app/actions.js @@ -104,6 +104,7 @@ var actions = { txError: txError, nextTx: nextTx, previousTx: previousTx, + cancelAllTx: cancelAllTx, viewPendingTx: viewPendingTx, VIEW_PENDING_TX: 'VIEW_PENDING_TX', // app messages @@ -457,6 +458,16 @@ function cancelTx (txData) { } } +function cancelAllTx (txsData) { + return (dispatch) => { + txsData.forEach((txData, i) => { + background.cancelTransaction(txData.id, () => { + dispatch(actions.completedTx(txData.id)) + i === txsData.length - 1 ? dispatch(actions.goHome()) : null + }) + }) + } +} // // initialize screen // |