cancel all txs

feature/default_network_editable
DavidNinja 7 years ago
parent 68c6b2d666
commit 399c51c048
  1. 8
      ui/app/actions.js
  2. 12
      ui/app/conf-tx.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
//

@ -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({

Loading…
Cancel
Save