Display newest transaction

feature/default_network_editable
Alexander Tseung 6 years ago
parent e89549846f
commit 7732cd4100
  1. 2
      app/scripts/controllers/transactions/index.js
  2. 3
      ui/app/components/app-header/app-header.component.js
  3. 5
      ui/app/components/pages/confirm-transaction/confirm-transaction.component.js
  4. 2
      ui/app/ducks/confirm-transaction.duck.js

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

@ -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() }

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

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

Loading…
Cancel
Save