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(ramp): undefined payment method #8801

Merged
merged 1 commit into from
Mar 1, 2024

Conversation

wachunei
Copy link
Member

@wachunei wachunei commented Mar 1, 2024

Description

This PR fixes a bug on the usePaymentMethods hook that was resetting an allow list then the region object changed instead of its id, while the rest of the logic only changes by id. This was causing incomplete re-run of the logic resulting in an undefined selection of the payment method

Related issues

Fixes: https://consensyssoftware.atlassian.net/browse/RAMPS-1416

Manual testing steps

  1. Go to Buy flow
  2. Reach Build Quote screen
  3. Select New York
  4. Reselect New York
  5. Payment method must not be undefined (see recordings)

Screenshots/Recordings

Before

1416-before.mp4

After

1516-after.mp4

Pre-merge author checklist

  • I’ve followed MetaMask Coding Standards.
  • I've clearly explained what problem this PR is solving and how it is solved.
  • I've linked related issues
  • I've included manual testing steps
  • I've included screenshots/recordings if applicable
  • I’ve included tests if applicable
  • I’ve documented my code using JSDoc format if applicable
  • I’ve applied the right labels on the PR (see labeling guidelines). Not required for external contributors.
  • I’ve properly set the pull request status:
    • In case it's not yet "ready for review", I've set it to "draft".
    • In case it's "ready for review", I've changed it from "draft" to "non-draft".

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.

@wachunei wachunei added needs-dev-review PR needs reviews from other engineers (in order to receive required approvals) team-ramp issues related to Ramp features needs-ramp-qa Tickets that need feature QA on the ramps flows labels Mar 1, 2024
@wachunei wachunei requested a review from a team as a code owner March 1, 2024 16:35
Copy link

sonarcloud bot commented Mar 1, 2024

Copy link
Contributor

@Cal-L Cal-L left a comment

Choose a reason for hiding this comment

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

LGTM

@wachunei wachunei removed the needs-dev-review PR needs reviews from other engineers (in order to receive required approvals) label Mar 1, 2024
@bkirb
Copy link
Contributor

bkirb commented Mar 1, 2024

@wachunei LGTM, I reproduced the bug in main and verified the fix in this branch ✅

@wachunei wachunei added ramp-qa-passed and removed needs-ramp-qa Tickets that need feature QA on the ramps flows labels Mar 1, 2024
@wachunei wachunei merged commit 178cf04 into main Mar 1, 2024
46 checks passed
@wachunei wachunei deleted the fix/ramp-undefined-payment-method branch March 1, 2024 17:09
@github-actions github-actions bot locked and limited conversation to collaborators Mar 1, 2024
@metamaskbot metamaskbot added the release-7.18.0 Issue or pull request that will be included in release 7.18.0 label Mar 1, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
ramp-qa-passed release-7.18.0 Issue or pull request that will be included in release 7.18.0 team-ramp issues related to Ramp features
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

4 participants