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: remove hardcoded selected network name #6365

Merged
merged 6 commits into from
May 24, 2023

Conversation

wachunei
Copy link
Member

@wachunei wachunei commented May 10, 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 removes the dependency for network names upon a hardcoded array. The providerConfig.nickname and aggregator chainName will be used. In the case neither exist, we will use "this network".

This is a continuation of this PR #6340

Screenshots/Recordings

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

QA

The token list in the Amount To Buy view must display the network shortName.

Issue

Progresses #???

Checklist

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

@wachunei wachunei force-pushed the feature/onramp-dynamic-chain-names branch 2 times, most recently from 86c069b to 6b98834 Compare May 12, 2023 15:38
@socket-security
Copy link

socket-security bot commented May 12, 2023

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


🚨 Potential security issues found in this pull request. To accept the risk, merge this PR and you will not be notified again.

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

  • @SocketSecurity ignore bn.js@4.11.6
  • @SocketSecurity ignore bn.js@4.11.8
  • @SocketSecurity ignore bn.js@4.12.0
  • @SocketSecurity ignore bn.js@5.2.0
  • @SocketSecurity ignore bn.js@5.2.1

Ignoring: @consensys/on-ramp-sdk@1.20.0

⚠️ Unmaintained

Package has not been updated in more than a year and may be unmaintained. Problems with the package may go unaddressed.

Package should publish periodic maintenance releases if they are maintained, or deprecate if they have no intention in further maintenance.

Package Last Publish Date Source
bn.js@4.11.6 (added) 5/24/2022, 10:36:50 AM package.json via @metamask/address-book-controller@2.0.0, @metamask/approval-controller@2.1.0, @metamask/assets-controllers@5.0.0, @metamask/base-controller@2.0.0, @metamask/composable-controller@2.0.0, @metamask/controller-utils@3.0.0, @metamask/gas-fee-controller@4.0.0, @metamask/keyring-controller@1.0.1, @metamask/network-controller@5.0.0, @metamask/permission-controller@3.0.0, @metamask/phishing-controller@3.0.0, @metamask/preferences-controller@2.1.0, @metamask/signature-controller@2.0.0, @metamask/swaps-controller@6.8.0, @metamask/transaction-controller@4.0.0, ethjs-contract@0.2.3, ethjs-ens@2.0.1, ethjs-query@0.3.8, ethjs-unit@0.1.6, number-to-bn@1.7.0
bn.js@4.11.8 (added) 5/24/2022, 10:36:50 AM package.json via @walletconnect/client@1.7.1, @walletconnect/utils@1.7.1
bn.js@4.12.0 (added) 5/24/2022, 10:36:50 AM package.json via @eth-optimism/contracts@0.0.0-2021919175625, @ethereumjs/common@2.4.0, @ethereumjs/tx@3.3.0, @ethersproject/abi@5.7.0, @ethersproject/contracts@5.7.0, @ethersproject/providers@5.7.2, @keystonehq/bc-ur-registry-eth@0.7.7, @keystonehq/metamask-airgapped-keyring@0.3.0, @keystonehq/ur-decoder@0.6.1, @metamask/address-book-controller@2.0.0, @metamask/approval-controller@2.1.0, @metamask/assets-controllers@5.0.0, @metamask/base-controller@2.0.0, @metamask/composable-controller@2.0.0, @metamask/controller-utils@3.0.0, @metamask/eth-sig-util@4.0.1, @metamask/gas-fee-controller@4.0.0, @metamask/keyring-controller@1.0.1, @metamask/network-controller@5.0.0, @metamask/permission-controller@3.0.0, @metamask/phishing-controller@3.0.0, @metamask/preferences-controller@2.1.0, @metamask/sdk-communication-layer@0.2.2, @metamask/signature-controller@2.0.0, @metamask/swaps-controller@6.8.0, @metamask/transaction-controller@4.0.0, eciesjs@0.3.15, eth-json-rpc-filters@4.2.2, eth-json-rpc-infura@5.1.0, eth-json-rpc-middleware@4.3.0, ethereumjs-abi@0.6.6, ethereumjs-util@6.1.0, ethers@5.7.0, react-native-crypto@2.1.2
bn.js@5.2.0 (added) 5/24/2022, 10:36:50 AM package.json via @ethereumjs/common@2.4.0, @ethereumjs/tx@3.3.0, @keystonehq/bc-ur-registry-eth@0.7.7, @keystonehq/metamask-airgapped-keyring@0.3.0, @keystonehq/ur-decoder@0.6.1, @metamask/address-book-controller@2.0.0, @metamask/approval-controller@2.1.0, @metamask/assets-controllers@5.0.0, @metamask/base-controller@2.0.0, @metamask/composable-controller@2.0.0, @metamask/controller-utils@3.0.0, @metamask/gas-fee-controller@4.0.0, @metamask/keyring-controller@1.0.1, @metamask/network-controller@5.0.0, @metamask/permission-controller@3.0.0, @metamask/phishing-controller@3.0.0, @metamask/preferences-controller@2.1.0, @metamask/signature-controller@2.0.0, @metamask/swaps-controller@6.8.0, @metamask/transaction-controller@4.0.0, react-native-crypto@2.1.2
bn.js@5.2.1 (added) 5/24/2022, 10:36:50 AM package.json via @eth-optimism/contracts@0.0.0-2021919175625, @ethersproject/abi@5.7.0, @ethersproject/contracts@5.7.0, @ethersproject/providers@5.7.2, @metamask/assets-controllers@5.0.0, @metamask/swaps-controller@6.8.0, ethers@5.7.0
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 ⚠️ 5 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

📊 Modified Dependency Overview:

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

@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
@wachunei wachunei marked this pull request as ready for review May 12, 2023 15:58
@wachunei wachunei requested a review from a team as a code owner May 12, 2023 15:58
@wachunei wachunei force-pushed the feature/onramp-dynamic-chain-names branch from 47ca9f6 to 28bb2af Compare May 16, 2023 14:11
@wachunei wachunei added release-7.1.0 and removed release-6.7.0 6.7.0 release tickets labels May 23, 2023
@bkirb
Copy link
Contributor

bkirb commented May 24, 2023

@wachunei I verified I see the short name now in the amount to buy modal

@wachunei
Copy link
Member Author

@SocketSecurity ignore @consensys/on-ramp-sdk@1.20.0

@wachunei wachunei removed needs-dev-review PR needs reviews from other engineers (in order to receive required approvals) needs-ramp-qa Tickets that need feature QA on the ramps flows labels May 24, 2023
@sethkfman
Copy link
Contributor

@wachunei Review the Socket.io Bot Commands to ignore the commands since the library is one of our own

@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 3 Code Smells

0.0% 0.0% Coverage
0.0% 0.0% Duplication

@wachunei
Copy link
Member Author

@SocketSecurity @consensys/on-ramp-sdk@*

@wachunei
Copy link
Member Author

@sethkfman I'm getting warnings from dependencies that are coming from main, what should we do about these?

@wachunei wachunei merged commit ccb2569 into main May 24, 2023
13 of 14 checks passed
@wachunei wachunei deleted the feature/onramp-dynamic-chain-names branch May 24, 2023 14:44
@github-actions github-actions bot locked and limited conversation to collaborators May 24, 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