1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-23 10:30:04 +01:00
metamask-extension/ui/app/hooks
Mark Stacey cdfa2e66fd
Hide retry button for on-chain failures (#9506)
On-chain failed transactions have a transaction status of `confirmed`,
and should not be retried. Our retry function doesn't handle on-chain
failures yet, so it would inevitably fail due to the transaction having
the same nonce as a confirmed on-chain transaction.

When determining whether to show the retry button in the UI, we had
mistakenly been using a `status` variable that determined whether we
should show "Failed" on that transaction in the activity log. That
display status includes both network and on-chain failures, unlike
the `txMeta.status` property.

The `showRetry` logic has been updated to ensure it's only shown when
`txMeta.status` is `failed`, meaning on-chain failures will no longer
show the retry button. Additionally, the display-specific `status`
variable has been renamed to `displayedStatusKey`, to indicate that it
is a string that corresponds to a localized message, and that it's the
status meant for display purposes.
2020-10-07 14:59:38 -07:00
..
tests Hide retry button for on-chain failures (#9506) 2020-10-07 14:59:38 -07:00
useCancelTransaction.js
useCopyToClipboard.js
useCurrencyDisplay.js
useCurrentAsset.js Add MetaMask Swaps (#9482) 2020-10-06 15:58:38 -02:30
useEqualityCheck.js
useEthFiatAmount.js Add MetaMask Swaps (#9482) 2020-10-06 15:58:38 -02:30
useI18nContext.js
useMethodData.js
useMetricEvent.js
usePrevious.js Add MetaMask Swaps (#9482) 2020-10-06 15:58:38 -02:30
useRetryTransaction.js
useShouldShowSpeedUp.js
useSwappedTokenValue.js Add MetaMask Swaps (#9482) 2020-10-06 15:58:38 -02:30
useTimeout.js
useTokenData.js
useTokenDisplayValue.js
useTokenFiatAmount.js Add MetaMask Swaps (#9482) 2020-10-06 15:58:38 -02:30
useTokensToSearch.js Add MetaMask Swaps (#9482) 2020-10-06 15:58:38 -02:30
useTokenTracker.js
useTransactionDisplayData.js Hide retry button for on-chain failures (#9506) 2020-10-07 14:59:38 -07:00
useTransactionTimeRemaining.js Add MetaMask Swaps (#9482) 2020-10-06 15:58:38 -02:30
useUserPreferencedCurrency.js