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): transform aggregator network chain id to string #9415

Merged
merged 6 commits into from
May 9, 2024

Conversation

wachunei
Copy link
Member

Description

This PR prepares the Ramp codebase for an upcoming change in the Ramp API and Ramp SDK: the AggregatorNetwork['chainId'] will change from type number to string.

Places where it was being used as number have been changes to be used as string. Also, we now consider potential errors in places where the chainId was being transformed into a Hex string type (`0x${string}`), for example chainId with value "example" would have been involved in toHex(chainId) which would have thrown.

Once the Ramp API & SDK are updated, the transformation to string must be removed. This label marks the places it was done TODO(ramp, chainId-string):

Related issues

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

Manual testing steps

  1. Go through the Ramp flows correctly

Screenshots/Recordings

Before

After

Pre-merge author checklist

  • I’ve followed MetaMask Coding Standards.
  • 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 format if applicable
  • I’ve applied the right labels on the PR (see labeling guidelines). 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.

@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 Apr 25, 2024
@wachunei wachunei marked this pull request as ready for review April 25, 2024 21:49
@wachunei wachunei requested review from a team as code owners April 25, 2024 21:49
@wachunei wachunei added Run Smoke E2E Triggers smoke e2e on Bitrise and removed needs-dev-review PR needs reviews from other engineers (in order to receive required approvals) labels May 7, 2024
Copy link
Contributor

github-actions bot commented May 7, 2024

https://bitrise.io/ Bitrise

✅✅✅ pr_smoke_e2e_pipeline passed on Bitrise! ✅✅✅

Commit hash: dfe8c63
Build link: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/dd776da9-ff81-47ed-83c2-321ad9ed8e1f

Note

  • You can kick off another pr_smoke_e2e_pipeline on Bitrise by removing and re-applying the Run Smoke E2E label on the pull request

@wachunei wachunei added Run Smoke E2E Triggers smoke e2e on Bitrise and removed Run Smoke E2E Triggers smoke e2e on Bitrise labels May 7, 2024
@bkirb
Copy link
Contributor

bkirb commented May 9, 2024

@wachunei LGTM for QA ✅

@wachunei wachunei removed the needs-ramp-qa Tickets that need feature QA on the ramps flows label May 9, 2024
@wachunei wachunei added Run Smoke E2E Triggers smoke e2e on Bitrise and removed Run Smoke E2E Triggers smoke e2e on Bitrise labels May 9, 2024
Copy link
Contributor

github-actions bot commented May 9, 2024

https://bitrise.io/ Bitrise

✅✅✅ pr_smoke_e2e_pipeline passed on Bitrise! ✅✅✅

Commit hash: 2506f57
Build link: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/3706e7f0-2a42-42a5-87e1-d8fee804653e

Note

  • You can kick off another pr_smoke_e2e_pipeline on Bitrise by removing and re-applying the Run Smoke E2E label on the pull request

Copy link

sonarqubecloud bot commented May 9, 2024

@wachunei wachunei added Run Smoke E2E Triggers smoke e2e on Bitrise and removed Run Smoke E2E Triggers smoke e2e on Bitrise labels May 9, 2024
@wachunei wachunei merged commit 80fb30f into main May 9, 2024
39 checks passed
@wachunei wachunei deleted the refactor/ramp-chainId-as-string branch May 9, 2024 16:45
@github-actions github-actions bot locked and limited conversation to collaborators May 9, 2024
@metamaskbot metamaskbot added the release-7.23.0 Issue or pull request that will be included in release 7.23.0 label May 9, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
release-7.23.0 Issue or pull request that will be included in release 7.23.0 Run Smoke E2E Triggers smoke e2e on Bitrise team-ramp issues related to Ramp features
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

4 participants