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()
|
this.props.hideModal()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
handleRetry = () => {
|
||||||
|
const { onRetry, hideModal } = this.props
|
||||||
|
|
||||||
|
Promise.resolve(onRetry()).then(() => hideModal())
|
||||||
|
}
|
||||||
|
|
||||||
render () {
|
render () {
|
||||||
const { t } = this.context
|
const { t } = this.context
|
||||||
const { transaction, onRetry, showRetry, onCancel, showCancel } = this.props
|
const { transaction, showRetry, onCancel, showCancel } = this.props
|
||||||
const { txParams: { nonce } = {} } = transaction
|
const { txParams: { nonce } = {} } = transaction
|
||||||
const decimalNonce = nonce && hexToDecimal(nonce)
|
const decimalNonce = nonce && hexToDecimal(nonce)
|
||||||
|
|
||||||
@ -37,7 +43,7 @@ export default class TransactionConfirmed extends PureComponent {
|
|||||||
>
|
>
|
||||||
<TransactionListItemDetails
|
<TransactionListItemDetails
|
||||||
transaction={transaction}
|
transaction={transaction}
|
||||||
onRetry={() => onRetry()}
|
onRetry={this.handleRetry}
|
||||||
showRetry={showRetry}
|
showRetry={showRetry}
|
||||||
onCancel={() => onCancel()}
|
onCancel={() => onCancel()}
|
||||||
showCancel={showCancel}
|
showCancel={showCancel}
|
||||||
|
@ -81,12 +81,12 @@ export default class TransactionListItem extends PureComponent {
|
|||||||
setSelectedToken(to)
|
setSelectedToken(to)
|
||||||
}
|
}
|
||||||
|
|
||||||
this.resubmit()
|
return this.resubmit()
|
||||||
}
|
}
|
||||||
|
|
||||||
resubmit () {
|
resubmit () {
|
||||||
const { transaction: { id }, retryTransaction, history } = this.props
|
const { transaction: { id }, retryTransaction, history } = this.props
|
||||||
retryTransaction(id)
|
return retryTransaction(id)
|
||||||
.then(id => history.push(`${CONFIRM_TRANSACTION_ROUTE}/${id}`))
|
.then(id => history.push(`${CONFIRM_TRANSACTION_ROUTE}/${id}`))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user