aboutsummaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
authorAlexander Tseung <alextsg@gmail.com>2018-06-26 12:29:16 +0800
committerAlexander Tseung <alextsg@gmail.com>2018-07-07 07:27:08 +0800
commit7732cd4100f3c40f35eeaec669094f63292cbe3d (patch)
treef09c5e60901d4ae83e6f0cb1f5856e369b141d68 /ui
parente89549846fd3bd520b99740c7845f48f368c3afa (diff)
downloadtangerine-wallet-browser-7732cd4100f3c40f35eeaec669094f63292cbe3d.tar
tangerine-wallet-browser-7732cd4100f3c40f35eeaec669094f63292cbe3d.tar.gz
tangerine-wallet-browser-7732cd4100f3c40f35eeaec669094f63292cbe3d.tar.bz2
tangerine-wallet-browser-7732cd4100f3c40f35eeaec669094f63292cbe3d.tar.lz
tangerine-wallet-browser-7732cd4100f3c40f35eeaec669094f63292cbe3d.tar.xz
tangerine-wallet-browser-7732cd4100f3c40f35eeaec669094f63292cbe3d.tar.zst
tangerine-wallet-browser-7732cd4100f3c40f35eeaec669094f63292cbe3d.zip
Display newest transaction
Diffstat (limited to 'ui')
-rw-r--r--ui/app/components/app-header/app-header.component.js3
-rw-r--r--ui/app/components/pages/confirm-transaction/confirm-transaction.component.js5
-rw-r--r--ui/app/ducks/confirm-transaction.duck.js2
3 files changed, 5 insertions, 5 deletions
diff --git a/ui/app/components/app-header/app-header.component.js b/ui/app/components/app-header/app-header.component.js
index 62b04562a..07ca6cf84 100644
--- a/ui/app/components/app-header/app-header.component.js
+++ b/ui/app/components/app-header/app-header.component.js
@@ -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() }
diff --git a/ui/app/components/pages/confirm-transaction/confirm-transaction.component.js b/ui/app/components/pages/confirm-transaction/confirm-transaction.component.js
index 29ee5eedc..d4581e8ed 100644
--- a/ui/app/components/pages/confirm-transaction/confirm-transaction.component.js
+++ b/ui/app/components/pages/confirm-transaction/confirm-transaction.component.js
@@ -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)
}
}
diff --git a/ui/app/ducks/confirm-transaction.duck.js b/ui/app/ducks/confirm-transaction.duck.js
index c4557bf2f..cb3582ec3 100644
--- a/ui/app/ducks/confirm-transaction.duck.js
+++ b/ui/app/ducks/confirm-transaction.duck.js
@@ -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,