diff options
author | DavidNinja <david@vietnamese.ninja> | 2017-08-15 12:29:21 +0800 |
---|---|---|
committer | DavidNinja <david@vietnamese.ninja> | 2017-08-15 12:29:21 +0800 |
commit | 399c51c04831381da0b9013018763b43618de614 (patch) | |
tree | e6320455d73ff8b89ceb342d841069a9fa75bcdf | |
parent | 68c6b2d666719476bff78cbc107a56be3b86dbe1 (diff) | |
download | tangerine-wallet-browser-399c51c04831381da0b9013018763b43618de614.tar tangerine-wallet-browser-399c51c04831381da0b9013018763b43618de614.tar.gz tangerine-wallet-browser-399c51c04831381da0b9013018763b43618de614.tar.bz2 tangerine-wallet-browser-399c51c04831381da0b9013018763b43618de614.tar.lz tangerine-wallet-browser-399c51c04831381da0b9013018763b43618de614.tar.xz tangerine-wallet-browser-399c51c04831381da0b9013018763b43618de614.tar.zst tangerine-wallet-browser-399c51c04831381da0b9013018763b43618de614.zip |
cancel all txs
-rw-r--r-- | ui/app/actions.js | 8 | ||||
-rw-r--r-- | ui/app/conf-tx.js | 12 |
2 files changed, 20 insertions, 0 deletions
diff --git a/ui/app/actions.js b/ui/app/actions.js index eafd04b4c..d5ee3cc31 100644 --- a/ui/app/actions.js +++ b/ui/app/actions.js @@ -105,6 +105,8 @@ var actions = { txError: txError, nextTx: nextTx, previousTx: previousTx, + cancelAllTx: cancelAllTx, + CANCEL_ALL_TX: 'CANCEL_ALL_TX', viewPendingTx: viewPendingTx, VIEW_PENDING_TX: 'VIEW_PENDING_TX', // app messages @@ -470,6 +472,12 @@ function cancelTx (txData) { } } +function cancelAllTx (txsData) { + return (dispatch) => { + txsData.forEach((txData) => dispatch(actions.cancelTx(txData))) + dispatch(actions.goHome()) + } +} // // initialize screen // diff --git a/ui/app/conf-tx.js b/ui/app/conf-tx.js index 34727ff78..d6ceb7ff5 100644 --- a/ui/app/conf-tx.js +++ b/ui/app/conf-tx.js @@ -89,6 +89,18 @@ ConfirmTxScreen.prototype.render = function () { }), ]), + h('h3', { + style: { + alignSelf: 'flex-end', + display: unconfTxList.length > 1 ? 'block' : 'none', + }, + }, [ + h('i.fa.fa-trash.fa-lg.cursor-pointer', { + title: 'Cancel All Pending Transactions', + onClick: () => props.dispatch(actions.cancelAllTx(unconfTxList)), + }), + ]), + warningIfExists(props.warning), currentTxView({ |