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: add params validation to useSDKMethod hook #6381

Merged
merged 7 commits into from
May 25, 2023

Conversation

wachunei
Copy link
Member

@wachunei wachunei commented May 12, 2023

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 uses upgrades the on-ramp-sdk to v1.20.0 and uses the new SDK.getSignature method to retrieve an array that indicates if each parameter of a method is required or optional.

This allows to enforce required parameters to not be null or undefined. In case a required parameter is not valid, the method call will not happen.

QA Steps
Buy flow should be completed without any changes compared to previous version

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.7.0 6.7.0 release tickets labels May 12, 2023
@socket-security
Copy link

socket-security bot commented May 12, 2023

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


👍 No dependency changes detected in pull request

Pull request alert summary
Issue Status
Critical CVE ✅ 0 issues
CVE ✅ 0 issues
Mild CVE ✅ 0 issues
Install scripts ✅ 0 issues
Native code ✅ 0 issues
Bin script confusion ✅ 0 issues
Bin script shell injection ✅ 0 issues
Filesystem access ✅ 0 issues
Network access ✅ 0 issues
Shell access ✅ 0 issues
Unresolved require ✅ 0 issues
Invalid package.json ✅ 0 issues
HTTP dependency ✅ 0 issues
Git dependency ✅ 0 issues
GitHub dependency ✅ 0 issues
No bug tracker ✅ 0 issues
No contributors or author data ✅ 0 issues
No README ✅ 0 issues
Deprecated ✅ 0 issues
New author ✅ 0 issues
Unstable ownership ✅ 0 issues
Non-existent author ✅ 0 issues
Unmaintained ✅ 0 issues
Unpublished package ✅ 0 issues
Potential typo squat ✅ 0 issues
Known Malware ✅ 0 issues
Telemetry ✅ 0 issues
Protestware/Troll package ✅ 0 issues
AI detected security risk ✅ 0 issues
AI warning ✅ 0 issues

@wachunei wachunei marked this pull request as ready for review May 12, 2023 17:32
@wachunei wachunei requested a review from a team as a code owner May 12, 2023 17:32
jgmontoya
jgmontoya previously approved these changes May 12, 2023
@wachunei wachunei force-pushed the feature/onramp-sdk-use-method-signature branch from b04996d to af2ff5a Compare May 12, 2023 18:51
@wachunei wachunei added release-7.1.0 and removed release-6.7.0 6.7.0 release tickets labels May 23, 2023
@wachunei wachunei removed the needs-dev-review PR needs reviews from other engineers (in order to receive required approvals) label May 24, 2023
@sonarcloud
Copy link

sonarcloud bot commented May 24, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

0.0% 0.0% Coverage
0.0% 0.0% Duplication

@bkirb
Copy link
Contributor

bkirb commented May 25, 2023

I verified the buying flow on this branch

@wachunei wachunei removed the needs-ramp-qa Tickets that need feature QA on the ramps flows label May 25, 2023
@wachunei wachunei merged commit dbc1bd6 into main May 25, 2023
13 checks passed
@wachunei wachunei deleted the feature/onramp-sdk-use-method-signature branch May 25, 2023 13:04
@github-actions github-actions bot locked and limited conversation to collaborators May 25, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
ramp-qa-passed release-7.1.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