diff options
Diffstat (limited to 'ui')
-rw-r--r-- | ui/app/components/modals/transaction-details/transaction-details.component.js | 10 | ||||
-rw-r--r-- | ui/app/components/transaction-list-item/transaction-list-item.component.js | 4 |
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}`)) } |