1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-01 00:28:06 +01:00
metamask-extension/ui/app/hooks/tests
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
..
useCancelTransaction.test.js Update ESLint shared config to v3 (#9274) 2020-08-19 13:57:05 -02:30
useCurrencyDisplay.test.js Update ESLint shared config to v3 (#9274) 2020-08-19 13:57:05 -02:30
useRetryTransaction.test.js Fix import/order issues (#9239) 2020-08-18 16:48:25 -02:30
useTokenData.test.js Replace abi-decoder with ethers (#9290) 2020-08-21 19:29:19 -07:00
useTokenDisplayValue.test.js Replace abi-decoder with ethers (#9290) 2020-08-21 19:29:19 -07:00
useTransactionDisplayData.test.js Hide retry button for on-chain failures (#9506) 2020-10-07 14:59:38 -07:00
useUserPreferencedCurrency.test.js Update ESLint shared config to v3 (#9274) 2020-08-19 13:57:05 -02:30