mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
Merge pull request #5270 from MetaMask/fix-retry
Fix speed up functionality
This commit is contained in:
commit
9ad3fa80f3
@ -13,8 +13,9 @@ export default class TransactionListItemDetails extends PureComponent {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static propTypes = {
|
static propTypes = {
|
||||||
transaction: PropTypes.object,
|
onRetry: PropTypes.func,
|
||||||
showRetry: PropTypes.bool,
|
showRetry: PropTypes.bool,
|
||||||
|
transaction: PropTypes.object,
|
||||||
}
|
}
|
||||||
|
|
||||||
handleEtherscanClick = () => {
|
handleEtherscanClick = () => {
|
||||||
@ -26,6 +27,13 @@ export default class TransactionListItemDetails extends PureComponent {
|
|||||||
this.setState({ showTransactionDetails: true })
|
this.setState({ showTransactionDetails: true })
|
||||||
}
|
}
|
||||||
|
|
||||||
|
handleRetry = event => {
|
||||||
|
const { onRetry } = this.props
|
||||||
|
|
||||||
|
event.stopPropagation()
|
||||||
|
onRetry()
|
||||||
|
}
|
||||||
|
|
||||||
render () {
|
render () {
|
||||||
const { t } = this.context
|
const { t } = this.context
|
||||||
const { transaction, showRetry } = this.props
|
const { transaction, showRetry } = this.props
|
||||||
@ -40,7 +48,7 @@ export default class TransactionListItemDetails extends PureComponent {
|
|||||||
showRetry && (
|
showRetry && (
|
||||||
<Button
|
<Button
|
||||||
type="raised"
|
type="raised"
|
||||||
onClick={this.handleEtherscanClick}
|
onClick={this.handleRetry}
|
||||||
className="transaction-list-item-details__header-button"
|
className="transaction-list-item-details__header-button"
|
||||||
>
|
>
|
||||||
{ t('speedUp') }
|
{ t('speedUp') }
|
||||||
|
@ -42,9 +42,7 @@ export default class TransactionListItem extends PureComponent {
|
|||||||
this.setState({ showTransactionDetails: !showTransactionDetails })
|
this.setState({ showTransactionDetails: !showTransactionDetails })
|
||||||
}
|
}
|
||||||
|
|
||||||
handleRetryClick = event => {
|
handleRetry = () => {
|
||||||
event.stopPropagation()
|
|
||||||
|
|
||||||
const {
|
const {
|
||||||
transaction: { txParams: { to } = {} },
|
transaction: { txParams: { to } = {} },
|
||||||
methodData: { name } = {},
|
methodData: { name } = {},
|
||||||
@ -156,6 +154,7 @@ export default class TransactionListItem extends PureComponent {
|
|||||||
<TransactionListItemDetails
|
<TransactionListItemDetails
|
||||||
transaction={transaction}
|
transaction={transaction}
|
||||||
showRetry={showRetry && methodData.done}
|
showRetry={showRetry && methodData.done}
|
||||||
|
onRetry={this.handleRetry}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user