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

refactor(ramp): add null case for payment method in order details #8359

Merged
merged 1 commit into from
Jan 23, 2024

Conversation

wachunei
Copy link
Member

@wachunei wachunei commented Jan 22, 2024

Description

This PR fixes a property accessor for a null object: some order information coming from our API had paymentMethod set to null and we were trying to destructure it, causing an error.

Related issues

Fixes:

Manual testing steps

No manual steps

Screenshots/Recordings

Before

After

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 No QA Needed/E2E Only Apply this label when your PR does not need any QA effort. needs-dev-review PR needs reviews from other engineers (in order to receive required approvals) team-ramp issues related to Ramp features No E2E Smoke Needed If the PR does not need E2E smoke test run labels Jan 22, 2024
@wachunei wachunei requested a review from a team as a code owner January 22, 2024 19:38
Copy link

sonarcloud bot commented Jan 22, 2024

Copy link
Contributor

@tommasini tommasini left a comment

Choose a reason for hiding this comment

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

LGTM!

@tommasini
Copy link
Contributor

Just to confirm @wachunei , the E2E does not cover this flow, that's why it's not needed right?

@wachunei wachunei removed the needs-dev-review PR needs reviews from other engineers (in order to receive required approvals) label Jan 23, 2024
@wachunei
Copy link
Member Author

@tommasini correct. Thanks for your review!

@wachunei wachunei merged commit b8741c7 into main Jan 23, 2024
44 of 45 checks passed
@wachunei wachunei deleted the refactor/ramp-null-payment-method-order-details branch January 23, 2024 15:36
@github-actions github-actions bot locked and limited conversation to collaborators Jan 23, 2024
@metamaskbot metamaskbot added the release-7.16.0 Issue or pull request that will be included in release 7.16.0 label Jan 23, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
No E2E Smoke Needed If the PR does not need E2E smoke test run No QA Needed/E2E Only Apply this label when your PR does not need any QA effort. release-7.16.0 Issue or pull request that will be included in release 7.16.0 team-ramp issues related to Ramp features
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants