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:
parent
e4092d740a
commit
cf6bead7ef
@ -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}
|
||||
|
@ -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}`))
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user