aboutsummaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
authorAlexander Tseung <alextsg@gmail.com>2018-09-27 05:58:27 +0800
committerDan Finlay <542863+danfinlay@users.noreply.github.com>2018-09-27 08:38:49 +0800
commitcf6bead7ef1fea81f44abc26e4bf6847b9624d0d (patch)
treec52fd5a9cae615f7a708503ec6eec72c68bf256e /ui
parente4092d740a075b62f047711a9315f7ccf7be19ed (diff)
downloadtangerine-wallet-browser-cf6bead7ef1fea81f44abc26e4bf6847b9624d0d.tar
tangerine-wallet-browser-cf6bead7ef1fea81f44abc26e4bf6847b9624d0d.tar.gz
tangerine-wallet-browser-cf6bead7ef1fea81f44abc26e4bf6847b9624d0d.tar.bz2
tangerine-wallet-browser-cf6bead7ef1fea81f44abc26e4bf6847b9624d0d.tar.lz
tangerine-wallet-browser-cf6bead7ef1fea81f44abc26e4bf6847b9624d0d.tar.xz
tangerine-wallet-browser-cf6bead7ef1fea81f44abc26e4bf6847b9624d0d.tar.zst
tangerine-wallet-browser-cf6bead7ef1fea81f44abc26e4bf6847b9624d0d.zip
Close transaction details modal when clicking speed up
Diffstat (limited to 'ui')
-rw-r--r--ui/app/components/modals/transaction-details/transaction-details.component.js10
-rw-r--r--ui/app/components/transaction-list-item/transaction-list-item.component.js4
2 files changed, 10 insertions, 4 deletions
diff --git a/ui/app/components/modals/transaction-details/transaction-details.component.js b/ui/app/components/modals/transaction-details/transaction-details.component.js
index ef438d01f..f2fec3409 100644
--- a/ui/app/components/modals/transaction-details/transaction-details.component.js
+++ b/ui/app/components/modals/transaction-details/transaction-details.component.js
@@ -22,9 +22,15 @@ export default class TransactionConfirmed extends PureComponent {
this.props.hideModal()
}
+ handleRetry = () => {
+ const { onRetry, hideModal } = this.props
+
+ Promise.resolve(onRetry()).then(() => hideModal())
+ }
+
render () {
const { t } = this.context
- const { transaction, onRetry, showRetry, onCancel, showCancel } = this.props
+ const { transaction, showRetry, onCancel, showCancel } = this.props
const { txParams: { nonce } = {} } = transaction
const decimalNonce = nonce && hexToDecimal(nonce)
@@ -37,7 +43,7 @@ export default class TransactionConfirmed extends PureComponent {
>
<TransactionListItemDetails
transaction={transaction}
- onRetry={() => onRetry()}
+ onRetry={this.handleRetry}
showRetry={showRetry}
onCancel={() => onCancel()}
showCancel={showCancel}
diff --git a/ui/app/components/transaction-list-item/transaction-list-item.component.js b/ui/app/components/transaction-list-item/transaction-list-item.component.js
index 9dfba875e..c1c69f59b 100644
--- a/ui/app/components/transaction-list-item/transaction-list-item.component.js
+++ b/ui/app/components/transaction-list-item/transaction-list-item.component.js
@@ -81,12 +81,12 @@ export default class TransactionListItem extends PureComponent {
setSelectedToken(to)
}
- this.resubmit()
+ return this.resubmit()
}
resubmit () {
const { transaction: { id }, retryTransaction, history } = this.props
- retryTransaction(id)
+ return retryTransaction(id)
.then(id => history.push(`${CONFIRM_TRANSACTION_ROUTE}/${id}`))
}