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

Close transaction details modal when clicking speed up

This commit is contained in:
Alexander Tseung 2018-09-26 14:58:27 -07:00 committed by Dan Finlay
parent e4092d740a
commit cf6bead7ef
2 changed files with 10 additions and 4 deletions

View File

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

View File

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