-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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: Refactor isTestNet
to accept chain ID
#7156
Conversation
a805805
to
f26746e
Compare
f26746e
to
e4ed547
Compare
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## main #7156 +/- ##
==========================================
- Coverage 32.84% 32.83% -0.01%
==========================================
Files 1006 1006
Lines 32731 32727 -4
Branches 8399 8396 -3
==========================================
- Hits 10749 10745 -4
Misses 21982 21982
☔ View full report in Codecov by Sentry. |
Passing E2E smoke test run: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/973063bf-1e8a-473f-8f41-a64a06f64235 |
The `isTestNet` utility function now accepts a chain ID rather than a network ID. The chain ID is easier for us to access because we know the chain ID for all networks statically, as it's a required network configuration property. The network ID on the other hand is looked up at runtime, and is sometimes not present. In practice we had already been passing in chain ID as network ID in many places This hasn't caused issues because they are equivalent for most (though not all) networks. This relates to MetaMask/mobile-planning#1226
This snapshot wasn't expected to change, but it seems to have been affected due to invalid test fixtures which had been missing the network ID.
c1d0708
to
4f7ae41
Compare
Kudos, SonarCloud Quality Gate passed! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Applying the E2E only test case because the scope of this change is quite small, and the affected area is covered by some E2E tests (e.g. the |
Development & PR Process
release-xx
label to identify the PR slated for a upcoming release (will be used in release discussion)needs-dev-review
label when work is completedneeds-qa
: PR requires manual QA.No QA/E2E only
: PR does not require any manual QA effort. Prior to merging, ensure that you have successful end-to-end test runs in Bitrise.Spot check on release build
: PR does not require feature QA but needs non-automated verification. In the description section, provide test scenarios. Add screenshots, and or recordings of what was tested.QA Passed
label when QA has signed off (Only required if the PR was labeled withneeds-qa
)team-
(orexternal-contributor
label if your not a MetaMask employee)Description
The
isTestNet
utility function now accepts a chain ID rather than a network ID. The chain ID is easier for us to access because we know the chain ID for all networks statically, as it's a required network configuration property. The network ID on the other hand is looked up at runtime, and is sometimes not present.In practice we had already been passing in chain ID as network ID in many places. This hasn't caused issues because they are equivalent for most (though not all) networks.
Issue
This relates to https://github.com/MetaMask/mobile-planning/issues/1226
Checklist