1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-24 19:10:22 +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 Update ESLint shared config to v3 (#9274) 2020-08-19 13:57:05 -02:30
useCopyToClipboard.js Add tooltip to contacts (#8974) 2020-07-24 11:17:03 -03:00
useCurrencyDisplay.js Update ESLint shared config to v3 (#9274) 2020-08-19 13:57:05 -02:30
useCurrentAsset.js Add MetaMask Swaps (#9482) 2020-10-06 15:58:38 -02:30
useEqualityCheck.js Fix useTokenTracker useEffect bug (#9334) 2020-09-02 14:19:04 -05:00
useEthFiatAmount.js Add MetaMask Swaps (#9482) 2020-10-06 15:58:38 -02:30
useI18nContext.js
useMethodData.js Implement new transaction list design (#8564) 2020-05-26 15:49:11 -05:00
useMetricEvent.js add segment implementation of metametrics (#9382) 2020-09-14 12:04:05 -05:00
usePrevious.js Add MetaMask Swaps (#9482) 2020-10-06 15:58:38 -02:30
useRetryTransaction.js Update ESLint shared config to v3 (#9274) 2020-08-19 13:57:05 -02:30
useShouldShowSpeedUp.js Adds the rule of hooks eslint rule (#8779) 2020-06-10 13:31:14 -05:00
useSwappedTokenValue.js Add MetaMask Swaps (#9482) 2020-10-06 15:58:38 -02:30
useTimeout.js Fix consistent-return issues (#9192) 2020-08-12 16:36:57 -02:30
useTokenData.js Implement new transaction list design (#8564) 2020-05-26 15:49:11 -05:00
useTokenDisplayValue.js Replace abi-decoder with ethers (#9290) 2020-08-21 19:29:19 -07:00
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 Fix useTokenTracker useEffect bug (#9334) 2020-09-02 14:19:04 -05:00
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 Fix import/order issues (#9239) 2020-08-18 16:48:25 -02:30