From 399c51c04831381da0b9013018763b43618de614 Mon Sep 17 00:00:00 2001 From: DavidNinja Date: Mon, 14 Aug 2017 21:29:21 -0700 Subject: cancel all txs --- ui/app/conf-tx.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'ui/app/conf-tx.js') diff --git a/ui/app/conf-tx.js b/ui/app/conf-tx.js index 34727ff78..d6ceb7ff5 100644 --- a/ui/app/conf-tx.js +++ b/ui/app/conf-tx.js @@ -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({ -- cgit v1.2.3 From 41e9904d9b6a6a9b828c02c7fe34b8eefb631374 Mon Sep 17 00:00:00 2001 From: Kevin Serrano Date: Thu, 7 Sep 2017 15:03:25 -0700 Subject: Convert icon to button. --- ui/app/conf-tx.js | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) (limited to 'ui/app/conf-tx.js') diff --git a/ui/app/conf-tx.js b/ui/app/conf-tx.js index d6ceb7ff5..8d819181f 100644 --- a/ui/app/conf-tx.js +++ b/ui/app/conf-tx.js @@ -89,18 +89,6 @@ 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({ @@ -117,6 +105,7 @@ ConfirmTxScreen.prototype.render = function () { buyEth: this.buyEth.bind(this, txParams.from || props.selectedAddress), sendTransaction: this.sendTransaction.bind(this), cancelTransaction: this.cancelTransaction.bind(this, txData), + cancelAllTransactions: this.cancelAllTransactions.bind(this, unconfTxList), signMessage: this.signMessage.bind(this, txData), signPersonalMessage: this.signPersonalMessage.bind(this, txData), cancelMessage: this.cancelMessage.bind(this, txData), @@ -163,6 +152,12 @@ ConfirmTxScreen.prototype.cancelTransaction = function (txData, event) { this.props.dispatch(actions.cancelTx(txData)) } +ConfirmTxScreen.prototype.cancelAllTransactions = function (unconfTxList, event) { + this.stopPropagation(event) + event.preventDefault() + this.props.dispatch(actions.cancelAllTx(unconfTxList)) +} + ConfirmTxScreen.prototype.signMessage = function (msgData, event) { log.info('conf-tx.js: signing message') var params = msgData.msgParams -- cgit v1.2.3 From 27ba7f6ed3b0c55f6f5d7fa7e3829bdc06e0df9f Mon Sep 17 00:00:00 2001 From: Kevin Serrano Date: Mon, 11 Sep 2017 14:12:35 -0700 Subject: Show reject all only when tx count is > 1 --- ui/app/conf-tx.js | 3 +++ 1 file changed, 3 insertions(+) (limited to 'ui/app/conf-tx.js') diff --git a/ui/app/conf-tx.js b/ui/app/conf-tx.js index 8d819181f..1ee4166f7 100644 --- a/ui/app/conf-tx.js +++ b/ui/app/conf-tx.js @@ -52,6 +52,8 @@ ConfirmTxScreen.prototype.render = function () { log.info(`rendering a combined ${unconfTxList.length} unconf msg & txs`) if (unconfTxList.length === 0) return h(Loading, { isLoading: true }) + const unconfTxListLength = unconfTxList.length + return ( h('.flex-column.flex-grow', [ @@ -101,6 +103,7 @@ ConfirmTxScreen.prototype.render = function () { conversionRate, currentCurrency, blockGasLimit, + unconfTxListLength, // Actions buyEth: this.buyEth.bind(this, txParams.from || props.selectedAddress), sendTransaction: this.sendTransaction.bind(this), -- cgit v1.2.3