Skip to content

Commit 49885ef

Browse files
authored
feat: Remove failed transaction retry icon button (#32024)
## **Description** There is an issue where after a transaction fails, using the retry button may result in a successful transaction, but the transaction would continue to say "Failed" in the transaction list. This seems to be an outstanding bug. We are hiding the retry button until further notice. I chose to comment these out rather than setting showRetry to make it more explicit that it is unused code. This retry button was shown in the TransactionListItemDetails when the failed transaction was neither a swap nor a smart transaction. The speedup and cancel buttons continue to exist. Speedup reuses the same logic as the Retry logic. ## **Related issues** Fixes: #28615 ## **Manual testing steps** 1. Submit a failed transaction a. e.g. Use Arbitrum One network b. Go to the test-dapp c. Send a EIP-1559 or Legacy Transaction (with gas specified by the dapp) 2. Go to MM > Activity 3. Click on the Failed transaction ## **Screenshots/Recordings** <!-- If applicable, add screenshots and/or recordings to visualize the before and after of your change. --> ### **Before** ![CleanShot 2025-04-11 at 09 40 46](https://github.com/user-attachments/assets/4d1ecb74-2a3a-4674-81ea-c56fcd99f0f2) ### **After** ![CleanShot 2025-04-15 at 18 12 17](https://github.com/user-attachments/assets/b15eee49-4cfb-4bb5-ba06-94e8a2f6b314) ## **Pre-merge author checklist** - [ ] I've followed [MetaMask Contributor Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Extension Coding Standards](https://github.com/MetaMask/metamask-extension/blob/main/.github/guidelines/CODING_GUIDELINES.md). - [ ] I've completed the PR template to the best of my ability - [ ] I’ve included tests if applicable - [ ] I’ve documented my code using [JSDoc](https://jsdoc.app/) format if applicable - [ ] I’ve applied the right labels on the PR (see [labeling guidelines](https://github.com/MetaMask/metamask-extension/blob/main/.github/guidelines/LABELING_GUIDELINES.md)). Not required for external contributors. ## **Pre-merge reviewer checklist** - [ ] I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed). - [ ] I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots.
1 parent d7f21f5 commit 49885ef

File tree

4 files changed

+33
-18
lines changed

4 files changed

+33
-18
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
2323
- Update multichain network controller to implement `getNetworksWithActivityByAccounts` method and add state management for networks with activity ([#31414](https://github.com/MetaMask/metamask-extension/pull/31414))
2424
- Update security and privacy policy description to reflect Solana account handling ([#32231](https://github.com/MetaMask/metamask-extension/pull/32231))
2525
- Updates the Solana modal by adding a learn more link, UI tweaks and auto selects a solana account when it exists. ([#32087](https://github.com/MetaMask/metamask-extension/pull/32087))
26+
- Hide failed transaction retry button ([#32024](https://github.com/MetaMask/metamask-extension/pull/32024))
2627

2728
### Fixed
2829
- updates display decimals in Bridge experience 'More Quotes' section ([#32080](https://github.com/MetaMask/metamask-extension/pull/32080))

ui/components/app/transaction-list-item-details/transaction-list-item-details.component.js

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,12 @@ export default class TransactionListItemDetails extends PureComponent {
3333
onRetry: PropTypes.func,
3434
showCancel: PropTypes.bool,
3535
showSpeedUp: PropTypes.bool,
36-
showRetry: PropTypes.bool,
36+
/**
37+
* Disabling the retry button until further notice
38+
*
39+
* @see {@link https://github.com/MetaMask/metamask-extension/issues/28615}
40+
*/
41+
// showRetry: PropTypes.bool,
3742
isEarliestNonce: PropTypes.bool,
3843
primaryCurrency: PropTypes.string,
3944
transactionGroup: PropTypes.object,
@@ -147,7 +152,7 @@ export default class TransactionListItemDetails extends PureComponent {
147152
transactionGroup,
148153
primaryCurrency,
149154
showSpeedUp,
150-
showRetry,
155+
// showRetry,
151156
recipientAddress,
152157
recipientName,
153158
senderAddress,
@@ -187,7 +192,7 @@ export default class TransactionListItemDetails extends PureComponent {
187192
detailsModal
188193
/>
189194
)}
190-
{showRetry && (
195+
{/* {showRetry && (
191196
<Tooltip title={t('retryTransaction')}>
192197
<Button
193198
type="raised"
@@ -198,7 +203,7 @@ export default class TransactionListItemDetails extends PureComponent {
198203
<i className="fa fa-sync"></i>
199204
</Button>
200205
</Tooltip>
201-
)}
206+
)} */}
202207
</div>
203208
</div>
204209
<div className="transaction-list-item-details__header">

ui/components/app/transaction-list-item-details/transaction-list-item-details.component.test.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,13 @@ describe('TransactionListItemDetails Component', () => {
9292
});
9393
});
9494

95-
describe('Retry button', () => {
95+
/**
96+
* Disabling the retry button until further notice
97+
*
98+
* @see {@link https://github.com/MetaMask/metamask-extension/issues/28615}
99+
*/
100+
// eslint-disable-next-line jest/no-disabled-tests
101+
describe.skip('Retry button', () => {
96102
it('should render retry button with showRetry prop', async () => {
97103
const { queryByTestId } = await render({ showRetry: true });
98104

ui/components/app/transaction-list-item/transaction-list-item.component.js

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ import EditGasPopover from '../../../pages/confirmations/components/edit-gas-pop
6060
import { MetaMetricsContext } from '../../../contexts/metametrics';
6161
import { ActivityListItem } from '../../multichain';
6262
import { abortTransactionSigning } from '../../../store/actions';
63-
import { getIsSmartTransaction } from '../../../../shared/modules/selectors';
63+
// import { getIsSmartTransaction } from '../../../../shared/modules/selectors';
6464
import {
6565
useBridgeTxHistoryData,
6666
FINAL_NON_CONFIRMED_STATUSES,
@@ -86,9 +86,7 @@ function TransactionListItemInner({
8686
const [showRetryEditGasPopover, setShowRetryEditGasPopover] = useState(false);
8787
const { supportsEIP1559 } = useGasFeeContext();
8888
const { openModal } = useTransactionModalContext();
89-
const isSmartTransaction = useSelector((state) =>
90-
getIsSmartTransaction(state, chainId),
91-
);
89+
// const isSmartTransaction = useSelector(getIsSmartTransaction);
9290
const dispatch = useDispatch();
9391

9492
// Bridge transactions
@@ -193,10 +191,19 @@ function TransactionListItemInner({
193191
const isSignatureReq = category === TransactionGroupCategory.signatureRequest;
194192
const isApproval = category === TransactionGroupCategory.approval;
195193
const isUnapproved = status === TransactionStatus.unapproved;
196-
const isSwap = [
197-
TransactionGroupCategory.swap,
198-
TransactionGroupCategory.swapAndSend,
199-
].includes(category);
194+
195+
/**
196+
* Disabling the retry button until further notice
197+
*
198+
* @see {@link https://github.com/MetaMask/metamask-extension/issues/28615}
199+
*/
200+
// const isSwap = [
201+
// TransactionGroupCategory.swap,
202+
// TransactionGroupCategory.swapAndSend,
203+
// ].includes(category);
204+
// const showRetry =
205+
// status === TransactionStatus.failed && !isSwap && !isSmartTransaction;
206+
200207
const isSigning = status === TransactionStatus.approved;
201208
const isSubmitting = status === TransactionStatus.signed;
202209

@@ -366,11 +373,7 @@ function TransactionListItemInner({
366373
senderAddress={senderAddress}
367374
recipientAddress={recipientAddress}
368375
onRetry={retryTransaction}
369-
showRetry={
370-
status === TransactionStatus.failed &&
371-
!isSwap &&
372-
!isSmartTransaction
373-
}
376+
// showRetry={showRetry}
374377
showSpeedUp={shouldShowSpeedUp}
375378
isEarliestNonce={isEarliestNonce}
376379
onCancel={cancelTransaction}

0 commit comments

Comments
 (0)