mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
Show reject all only when tx count is > 1
This commit is contained in:
parent
06889377c8
commit
27ba7f6ed3
@ -67,6 +67,7 @@ PendingTx.prototype.render = function () {
|
|||||||
const balanceBn = hexToBn(balance)
|
const balanceBn = hexToBn(balance)
|
||||||
const insufficientBalance = balanceBn.lt(maxCost)
|
const insufficientBalance = balanceBn.lt(maxCost)
|
||||||
const buyDisabled = insufficientBalance || !this.state.valid || !isValidAddress || this.state.submitting
|
const buyDisabled = insufficientBalance || !this.state.valid || !isValidAddress || this.state.submitting
|
||||||
|
const showRejectAll = props.unconfTxListLength > 1
|
||||||
|
|
||||||
this.inputs = []
|
this.inputs = []
|
||||||
|
|
||||||
@ -318,7 +319,7 @@ PendingTx.prototype.render = function () {
|
|||||||
onClick: props.cancelTransaction,
|
onClick: props.cancelTransaction,
|
||||||
}, 'Reject'),
|
}, 'Reject'),
|
||||||
]),
|
]),
|
||||||
h('.flex-row.flex-space-around.conf-buttons', {
|
showRejectAll ? h('.flex-row.flex-space-around.conf-buttons', {
|
||||||
style: {
|
style: {
|
||||||
display: 'flex',
|
display: 'flex',
|
||||||
justifyContent: 'flex-end',
|
justifyContent: 'flex-end',
|
||||||
@ -328,7 +329,7 @@ PendingTx.prototype.render = function () {
|
|||||||
h('button.cancel.btn-red', {
|
h('button.cancel.btn-red', {
|
||||||
onClick: props.cancelAllTransactions,
|
onClick: props.cancelAllTransactions,
|
||||||
}, 'Reject All'),
|
}, 'Reject All'),
|
||||||
]),
|
]) : null,
|
||||||
]),
|
]),
|
||||||
])
|
])
|
||||||
)
|
)
|
||||||
|
@ -52,6 +52,8 @@ ConfirmTxScreen.prototype.render = function () {
|
|||||||
log.info(`rendering a combined ${unconfTxList.length} unconf msg & txs`)
|
log.info(`rendering a combined ${unconfTxList.length} unconf msg & txs`)
|
||||||
if (unconfTxList.length === 0) return h(Loading, { isLoading: true })
|
if (unconfTxList.length === 0) return h(Loading, { isLoading: true })
|
||||||
|
|
||||||
|
const unconfTxListLength = unconfTxList.length
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|
||||||
h('.flex-column.flex-grow', [
|
h('.flex-column.flex-grow', [
|
||||||
@ -101,6 +103,7 @@ ConfirmTxScreen.prototype.render = function () {
|
|||||||
conversionRate,
|
conversionRate,
|
||||||
currentCurrency,
|
currentCurrency,
|
||||||
blockGasLimit,
|
blockGasLimit,
|
||||||
|
unconfTxListLength,
|
||||||
// Actions
|
// Actions
|
||||||
buyEth: this.buyEth.bind(this, txParams.from || props.selectedAddress),
|
buyEth: this.buyEth.bind(this, txParams.from || props.selectedAddress),
|
||||||
sendTransaction: this.sendTransaction.bind(this),
|
sendTransaction: this.sendTransaction.bind(this),
|
||||||
|
Loading…
Reference in New Issue
Block a user