aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/actions.js
diff options
context:
space:
mode:
authorkumavis <aaron@kumavis.me>2017-09-13 02:51:22 +0800
committerkumavis <aaron@kumavis.me>2017-09-13 02:51:22 +0800
commit114dae5f8070e47409a01981f2aeff96827cbf41 (patch)
treebe37b3fd47a9f95c27d812d1d97b3858fe64a469 /ui/app/actions.js
parent8545453a9d58d7a54c10beef52e38107ed937117 (diff)
parentcafebb6417331d9d0a0a83fdc1cc4fdb04d0a5ec (diff)
downloadtangerine-wallet-browser-114dae5f8070e47409a01981f2aeff96827cbf41.tar
tangerine-wallet-browser-114dae5f8070e47409a01981f2aeff96827cbf41.tar.gz
tangerine-wallet-browser-114dae5f8070e47409a01981f2aeff96827cbf41.tar.bz2
tangerine-wallet-browser-114dae5f8070e47409a01981f2aeff96827cbf41.tar.lz
tangerine-wallet-browser-114dae5f8070e47409a01981f2aeff96827cbf41.tar.xz
tangerine-wallet-browser-114dae5f8070e47409a01981f2aeff96827cbf41.tar.zst
tangerine-wallet-browser-114dae5f8070e47409a01981f2aeff96827cbf41.zip
Merge branch 'master' of github.com:MetaMask/metamask-extension into filter-leak-fix3
Diffstat (limited to 'ui/app/actions.js')
-rw-r--r--ui/app/actions.js11
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
//