Conversation
…usion of a blockExplorerUrls property which is not required
|
CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes. |
|
looks good, spec also says it shouldn't be required: https://github.com/MetaMask/api-specs/blob/main/openrpc.yaml#L896-L900 |
| const firstValidRPCUrl = rpcUrls.find((rpcUrl) => isLocalhostOrHttps(rpcUrl)); | ||
| const firstValidBlockExplorerUrl = | ||
| blockExplorerUrls !== null && Array.isArray(blockExplorerUrls) | ||
| blockExplorerUrls && Array.isArray(blockExplorerUrls) |
There was a problem hiding this comment.
> Array.isArray(null)
false
> Array.isArray(undefined)
false
> Array.isArray(undefined)
false
> Array.isArray('')
false
> Array.isArray([])
true
Does the first part of the check need to be there in the first place?
There was a problem hiding this comment.
Seems like we can scrap it!
| expect(mocks.setActiveNetwork).toHaveBeenCalledWith(123); | ||
| }); | ||
|
|
||
| it('creates a new networkConfiguration when called with no "blockExplorerUrls" property', async () => { |
There was a problem hiding this comment.
| it('creates a new networkConfiguration when called with no "blockExplorerUrls" property', async () => { | |
| it('creates a new networkConfiguration when called without "blockExplorerUrls" property', async () => { |
cb9d89e
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #26938 +/- ##
========================================
Coverage 70.17% 70.17%
========================================
Files 1425 1425
Lines 49646 49644 -2
Branches 13891 13889 -2
========================================
Hits 34835 34835
+ Misses 14811 14809 -2 ☔ View full report in Codecov by Sentry. |
Builds ready [cb9d89e]
Page Load Metrics (1752 ± 65 ms)
Bundle size diffs [🚀 Bundle size reduced!]
|
|
Missing release label release-12.2.0 on PR. Adding release label release-12.2.0 on PR and removing other release labels(release-12.6.0), as PR was cherry-picked in branch 12.2.0. |



Fix issue where
wallet_addEtherumChainwas incorrectly enforcing inclusion of a blockExplorerUrls property which is not requiredDescription
Related issues
Fixes: #26844
Manual testing steps
Screenshots/Recordings
Before
Screen.Recording.2024-09-05.at.9.53.27.AM.mov
After
Screen.Recording.2024-09-05.at.9.48.34.AM.mov
Pre-merge author checklist
Pre-merge reviewer checklist