mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
Merge branch 'master' of github.com:davidp94/metamask-extension into rejectallunapproved
This commit is contained in:
commit
34e7bb5015
@ -104,6 +104,7 @@ var actions = {
|
|||||||
txError: txError,
|
txError: txError,
|
||||||
nextTx: nextTx,
|
nextTx: nextTx,
|
||||||
previousTx: previousTx,
|
previousTx: previousTx,
|
||||||
|
cancelAllTx: cancelAllTx,
|
||||||
viewPendingTx: viewPendingTx,
|
viewPendingTx: viewPendingTx,
|
||||||
VIEW_PENDING_TX: 'VIEW_PENDING_TX',
|
VIEW_PENDING_TX: 'VIEW_PENDING_TX',
|
||||||
// app messages
|
// 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
|
// 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),
|
warningIfExists(props.warning),
|
||||||
|
|
||||||
currentTxView({
|
currentTxView({
|
||||||
|
Loading…
Reference in New Issue
Block a user