diff options
author | Whymarrh Whitby <whymarrh.whitby@gmail.com> | 2018-09-24 13:07:19 +0800 |
---|---|---|
committer | Whymarrh Whitby <whymarrh.whitby@gmail.com> | 2018-10-02 00:14:54 +0800 |
commit | 2e35c05f148a823d04b5a0009afd45b3fcd1d3fa (patch) | |
tree | 503dedcb95b80db7ef435c7ca1f68a65f1126933 /ui/app/components/pages | |
parent | 7610248f8c09f9fb86da700ae2818e9b4bd07832 (diff) | |
download | tangerine-wallet-browser-2e35c05f148a823d04b5a0009afd45b3fcd1d3fa.tar tangerine-wallet-browser-2e35c05f148a823d04b5a0009afd45b3fcd1d3fa.tar.gz tangerine-wallet-browser-2e35c05f148a823d04b5a0009afd45b3fcd1d3fa.tar.bz2 tangerine-wallet-browser-2e35c05f148a823d04b5a0009afd45b3fcd1d3fa.tar.lz tangerine-wallet-browser-2e35c05f148a823d04b5a0009afd45b3fcd1d3fa.tar.xz tangerine-wallet-browser-2e35c05f148a823d04b5a0009afd45b3fcd1d3fa.tar.zst tangerine-wallet-browser-2e35c05f148a823d04b5a0009afd45b3fcd1d3fa.zip |
Confirm rejecting multiple transactions with modal
Diffstat (limited to 'ui/app/components/pages')
-rw-r--r-- | ui/app/components/pages/confirm-transaction-base/confirm-transaction-base.component.js | 18 | ||||
-rw-r--r-- | ui/app/components/pages/confirm-transaction-base/confirm-transaction-base.container.js | 3 |
2 files changed, 17 insertions, 4 deletions
diff --git a/ui/app/components/pages/confirm-transaction-base/confirm-transaction-base.component.js b/ui/app/components/pages/confirm-transaction-base/confirm-transaction-base.component.js index 7de147d79..707dad62d 100644 --- a/ui/app/components/pages/confirm-transaction-base/confirm-transaction-base.component.js +++ b/ui/app/components/pages/confirm-transaction-base/confirm-transaction-base.component.js @@ -44,6 +44,7 @@ export default class ConfirmTransactionBase extends Component { sendTransaction: PropTypes.func, showCustomizeGasModal: PropTypes.func, showTransactionConfirmedModal: PropTypes.func, + showRejectTransactionsConfirmationModal: PropTypes.func, toAddress: PropTypes.string, tokenData: PropTypes.object, tokenProps: PropTypes.object, @@ -252,13 +253,22 @@ export default class ConfirmTransactionBase extends Component { } handleCancelAll () { - const { cancelAllTransactions, history, clearConfirmTransaction } = this.props + const { + cancelAllTransactions, + clearConfirmTransaction, + history, + showRejectTransactionsConfirmationModal, + unapprovedTxCount, + } = this.props - cancelAllTransactions() - .then(() => { + showRejectTransactionsConfirmationModal({ + unapprovedTxCount, + async onSubmit () { + await cancelAllTransactions() clearConfirmTransaction() history.push(DEFAULT_ROUTE) - }) + }, + }) } handleCancel () { diff --git a/ui/app/components/pages/confirm-transaction-base/confirm-transaction-base.container.js b/ui/app/components/pages/confirm-transaction-base/confirm-transaction-base.container.js index 5fbd127c3..2e7677a45 100644 --- a/ui/app/components/pages/confirm-transaction-base/confirm-transaction-base.container.js +++ b/ui/app/components/pages/confirm-transaction-base/confirm-transaction-base.container.js @@ -111,6 +111,9 @@ const mapDispatchToProps = dispatch => { updateGasAndCalculate: ({ gasLimit, gasPrice }) => { return dispatch(updateGasAndCalculate({ gasLimit, gasPrice })) }, + showRejectTransactionsConfirmationModal: ({ onSubmit, unapprovedTxCount }) => { + return dispatch(showModal({ name: 'REJECT_TRANSACTIONS', onSubmit, unapprovedTxCount })) + }, cancelTransaction: ({ id }) => dispatch(cancelTx({ id })), cancelAllTransactions: (txList) => dispatch(cancelTxs(txList)), sendTransaction: txData => dispatch(updateAndApproveTx(txData)), |