|
|
@ -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
|
|
|
|
//
|
|
|
|
//
|
|
|
|