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

Display newest transaction

This commit is contained in:
Alexander Tseung 2018-06-25 21:29:16 -07:00
parent e89549846f
commit 7732cd4100
4 changed files with 6 additions and 6 deletions

View File

@ -157,7 +157,6 @@ class TransactionController extends EventEmitter {
// construct txMeta
let txMeta = this.txStateManager.generateTxMeta({ txParams: normalizedTxParams })
this.addTx(txMeta)
this.emit('newUnapprovedTx', txMeta)
try {
// check whether recipient account is blacklisted
@ -172,6 +171,7 @@ class TransactionController extends EventEmitter {
txMeta.loadingDefaults = false
// save txMeta
this.txStateManager.updateTx(txMeta)
this.emit('newUnapprovedTx', txMeta)
return txMeta
}

View File

@ -91,7 +91,6 @@ class AppHeader extends Component {
network,
provider,
history,
location,
isUnlocked,
} = this.props
@ -126,7 +125,7 @@ class AppHeader extends Component {
network={network}
provider={provider}
onClick={event => this.handleNetworkIndicatorClick(event)}
disabled={location.pathname === CONFIRM_TRANSACTION_ROUTE}
disabled={this.isConfirming()}
/>
</div>
{ this.renderAccountMenu() }

View File

@ -61,7 +61,7 @@ export default class ConfirmTransaction extends Component {
setTransactionToConfirm(paramsTransactionId)
}
if (!paramsTransactionId) {
if (!transactionId) {
this.setTransactionToConfirm()
}
}
@ -84,7 +84,8 @@ export default class ConfirmTransaction extends Component {
setTransactionToConfirm(paramsTransactionId)
}
} else if (unconfirmedTransactions.length) {
const transactionId = unconfirmedTransactions[0].id
const totalUnconfirmed = unconfirmedTransactions.length
const transactionId = unconfirmedTransactions[totalUnconfirmed - 1].id
setTransactionToConfirm(transactionId)
}
}

View File

@ -236,7 +236,7 @@ export function updateTxDataAndCalculate (txData) {
dispatch(updateTxData(txData))
const { txParams: { value, gas: gasLimit, gasPrice } = {} } = txData
const { txParams: { value, gas: gasLimit = '0x0', gasPrice = '0x0' } = {} } = txData
const fiatTransactionAmount = getTransactionAmount({
value, toCurrency: currentCurrency, conversionRate, numberOfDecimals: 2,