Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Allow to re-submit a cancelled swap if cancelled via a HW wallet #27171

Closed
wants to merge 1 commit into from

Conversation

dan437
Copy link
Contributor

@dan437 dan437 commented Sep 16, 2024

Description

This PR is a partial cherry pick of this one and fixes an edge case for this PR, where when a swap was cancelled on a HW device, the submit button for swaps was disabled. Now a user can resubmit cancelled swaps repeatedly.

It was already fixed here about a month ago, but it's not in the v12.3.0 release. That's why this partial cherry-pick is needed.

Manual testing steps

  1. Go to Swaps with a HW wallet on Ethereum Mainnet and Smart Transactions enabled in Advanced Settings
  2. Submit a swap, but cancel it on a HW device
  3. You should see the quote overview page again and the Swap button should be enabled

Screenshots/Recordings

Before

After

Pre-merge author checklist

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.

@dan437 dan437 requested review from a team as code owners September 16, 2024 15:23
Copy link
Contributor

CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes.

@dan437 dan437 added the team-transactions Transactions team label Sep 16, 2024
@metamaskbot metamaskbot added the INVALID-PR-TEMPLATE PR's body doesn't match template label Sep 16, 2024
@@ -1029,6 +1029,7 @@ export const signAndSendSwapsSmartTransaction = ({
dispatch(setSwapsSTXSubmitLoading(false));
} catch (e) {
console.log('signAndSendSwapsSmartTransaction error', e);
dispatch(setSwapsSTXSubmitLoading(false));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For a future PR, do you think it’d make sense to move dispatch(setSwapsSTXSubmitLoading(false)) into a finally block since we want it to run either way?

@dan437
Copy link
Contributor Author

dan437 commented Sep 17, 2024

Closing in favor of: #27210

@dan437 dan437 closed this Sep 17, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Sep 17, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
INVALID-PR-TEMPLATE PR's body doesn't match template team-transactions Transactions team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants