mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
Cleanup unnecessary pending tx-switching logic
This commit is contained in:
parent
35ff4c195c
commit
65327dd11f
@ -52,66 +52,25 @@ 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 })
|
||||||
|
|
||||||
return (
|
return currentTxView({
|
||||||
|
// Properties
|
||||||
h('.flex-column.flex-grow', [
|
txData: txData,
|
||||||
|
key: txData.id,
|
||||||
// subtitle and nav
|
selectedAddress: props.selectedAddress,
|
||||||
h('.section-title.flex-row.flex-center', [
|
accounts: props.accounts,
|
||||||
!isNotification ? h('i.fa.fa-arrow-left.fa-lg.cursor-pointer', {
|
identities: props.identities,
|
||||||
onClick: this.goHome.bind(this),
|
conversionRate,
|
||||||
}) : null,
|
currentCurrency,
|
||||||
h('h2.page-subtitle', 'Confirm Transaction'),
|
blockGasLimit,
|
||||||
isNotification ? h(NetworkIndicator, {
|
// Actions
|
||||||
network: network,
|
buyEth: this.buyEth.bind(this, txParams.from || props.selectedAddress),
|
||||||
provider: provider,
|
sendTransaction: this.sendTransaction.bind(this),
|
||||||
}) : null,
|
cancelTransaction: this.cancelTransaction.bind(this, txData),
|
||||||
]),
|
signMessage: this.signMessage.bind(this, txData),
|
||||||
|
signPersonalMessage: this.signPersonalMessage.bind(this, txData),
|
||||||
h('h3', {
|
cancelMessage: this.cancelMessage.bind(this, txData),
|
||||||
style: {
|
cancelPersonalMessage: this.cancelPersonalMessage.bind(this, txData),
|
||||||
alignSelf: 'center',
|
})
|
||||||
display: unconfTxList.length > 1 ? 'block' : 'none',
|
|
||||||
},
|
|
||||||
}, [
|
|
||||||
h('i.fa.fa-arrow-left.fa-lg.cursor-pointer', {
|
|
||||||
style: {
|
|
||||||
display: props.index === 0 ? 'none' : 'inline-block',
|
|
||||||
},
|
|
||||||
onClick: () => props.dispatch(actions.previousTx()),
|
|
||||||
}),
|
|
||||||
` ${props.index + 1} of ${unconfTxList.length} `,
|
|
||||||
h('i.fa.fa-arrow-right.fa-lg.cursor-pointer', {
|
|
||||||
style: {
|
|
||||||
display: props.index + 1 === unconfTxList.length ? 'none' : 'inline-block',
|
|
||||||
},
|
|
||||||
onClick: () => props.dispatch(actions.nextTx()),
|
|
||||||
}),
|
|
||||||
]),
|
|
||||||
|
|
||||||
warningIfExists(props.warning),
|
|
||||||
|
|
||||||
currentTxView({
|
|
||||||
// Properties
|
|
||||||
txData: txData,
|
|
||||||
key: txData.id,
|
|
||||||
selectedAddress: props.selectedAddress,
|
|
||||||
accounts: props.accounts,
|
|
||||||
identities: props.identities,
|
|
||||||
conversionRate,
|
|
||||||
currentCurrency,
|
|
||||||
blockGasLimit,
|
|
||||||
// Actions
|
|
||||||
buyEth: this.buyEth.bind(this, txParams.from || props.selectedAddress),
|
|
||||||
sendTransaction: this.sendTransaction.bind(this),
|
|
||||||
cancelTransaction: this.cancelTransaction.bind(this, txData),
|
|
||||||
signMessage: this.signMessage.bind(this, txData),
|
|
||||||
signPersonalMessage: this.signPersonalMessage.bind(this, txData),
|
|
||||||
cancelMessage: this.cancelMessage.bind(this, txData),
|
|
||||||
cancelPersonalMessage: this.cancelPersonalMessage.bind(this, txData),
|
|
||||||
}),
|
|
||||||
])
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function currentTxView (opts) {
|
function currentTxView (opts) {
|
||||||
|
Loading…
Reference in New Issue
Block a user