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

On-ramp: Use dynamic list of networks #6156

Merged
merged 8 commits into from
Apr 19, 2023
Merged

Conversation

wachunei
Copy link
Member

Development & PR Process

  1. Follow MetaMask Mobile Coding Standards
  2. Add release-xx label to identify the PR slated for a upcoming release (will be used in release discussion)
  3. Add needs-dev-review label when work is completed
  4. Add needs-qa label when dev review is completed
  5. Add QA Passed label when QA has signed off

Description

This PR adopts a dynamic list of supported networks for the on-ramp aggregator.

  • on-ramp-sdk is updated to version 1.12.0, this version includes getNetworks method
  • allowedToBuy method and hardcoded list was removed
  • useOnRampNetworks hook is added, it updates the networks on the state with the result of getNetworks
    • This update is done on mount and on network change
  • useOnRampNetwork hook and util functions are added to replace allowedToBuy

Screenshots/Recordings

If applicable, add screenshots and/or recordings to visualize the before and after of your change

Issue

Progresses #???

Checklist

  • There is a related GitHub issue
  • Tests are included if applicable
  • Any added code is fully documented

@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 release-6.5.0 labels Apr 10, 2023
@wachunei wachunei requested a review from a team as a code owner April 10, 2023 20:12
@socket-security
Copy link

New dependency changes detected. Learn more about Socket for GitHub ↗︎


👍 No new dependency issues detected in pull request

Bot Commands

To ignore an alert, reply with a comment starting with @SocketSecurity ignore followed by a space separated list of package-name@version specifiers. e.g. @SocketSecurity ignore foo@1.0.0 bar@* or ignore all packages with @SocketSecurity ignore-all

Pull request alert summary
Issue Status
Install scripts ✅ 0 issues
Native code ✅ 0 issues
Bin script shell injection ✅ 0 issues
Unresolved require ✅ 0 issues
Invalid package.json ✅ 0 issues
HTTP dependency ✅ 0 issues
Git dependency ✅ 0 issues
Potential typo squat ✅ 0 issues
Known Malware ✅ 0 issues
Telemetry ✅ 0 issues
Protestware/Troll package ✅ 0 issues

📊 Modified Dependency Overview:

⬆️ Updated Package Version Diff Added Capability Access +/- Transitive Count Publisher
@consensys/on-ramp-sdk@1.12.0 1.9.1...1.12.0 None +0/-0 klejeune-consensys

@wachunei
Copy link
Member Author

@bkirb can you confirm this is QAd please 🙏

@bkirb
Copy link
Contributor

bkirb commented Apr 18, 2023

@wachunei I verified this PR and made several orders with different tokens and chains.

@wachunei wachunei added ramp-qa-passed and removed needs-ramp-qa Tickets that need feature QA on the ramps flows labels Apr 18, 2023
@sethkfman
Copy link
Contributor

@wachunei Can you resolve the conflicts on this PR?

@wachunei
Copy link
Member Author

what conflicts? 😜 just did lol

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

@Cal-L Cal-L removed the needs-dev-review PR needs reviews from other engineers (in order to receive required approvals) label Apr 19, 2023
@wachunei wachunei merged commit 33bf3eb into main Apr 19, 2023
13 checks passed
@wachunei wachunei deleted the feature/onramp-networks branch April 19, 2023 19:04
@github-actions github-actions bot locked and limited conversation to collaborators Apr 19, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
ramp-qa-passed release-6.5.0 team-ramp issues related to Ramp features
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants