mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
cancel all txs
This commit is contained in:
parent
68c6b2d666
commit
399c51c048
@ -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…
Reference in New Issue
Block a user