1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-23 09:52:26 +01:00

Convert icon to button.

This commit is contained in:
Kevin Serrano 2017-09-07 15:03:25 -07:00
parent 3a87a30912
commit 41e9904d9b
No known key found for this signature in database
GPG Key ID: BF999DEFC7371BA1
2 changed files with 18 additions and 12 deletions

View File

@ -318,6 +318,17 @@ PendingTx.prototype.render = function () {
onClick: props.cancelTransaction,
}, 'Reject'),
]),
h('.flex-row.flex-space-around.conf-buttons', {
style: {
display: 'flex',
justifyContent: 'flex-end',
margin: '14px 25px',
},
}, [
h('button.cancel.btn-red', {
onClick: props.cancelAllTransactions,
}, 'Reject All'),
]),
]),
])
)

View File

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