-
Notifications
You must be signed in to change notification settings - Fork 327
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
fix: pass empty array for missing block explorers in wallet_addEthereumChain #4927
fix: pass empty array for missing block explorers in wallet_addEthereumChain #4927
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
🦋 Changeset detectedLatest commit: b26ec13 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Your org has enabled the Graphite merge queue for merging into mainAdd the label “merge-queue” to the PR and Graphite will automatically add it to the merge queue when it’s ready to merge. Or use the label “hotfix” to add to the merge queue as a hot fix. You must have a Graphite account and log in to Graphite in order to use the merge queue. Sign up using this link. |
This stack of pull requests is managed by Graphite. Learn more about stacking. Join @joaquim-verges and the rest of your teammates on Graphite |
size-limit report 📦
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #4927 +/- ##
==========================================
+ Coverage 47.60% 47.61% +0.01%
==========================================
Files 1057 1057
Lines 57228 57241 +13
Branches 3924 3928 +4
==========================================
+ Hits 27245 27257 +12
- Misses 29294 29295 +1
Partials 689 689
*This pull request uses carry forward flags. Click here to find out more.
|
@@ -271,7 +271,7 @@ async function switchChain(provider: Ethereum, chain: Chain) { | |||
chainName: apiChain.name, | |||
nativeCurrency: apiChain.nativeCurrency, | |||
rpcUrls: getValidPublicRPCUrl(apiChain), // no client id on purpose here | |||
blockExplorerUrls: apiChain.explorers?.map((x) => x.url), | |||
blockExplorerUrls: apiChain.explorers?.map((x) => x.url) || [], |
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.
null or array of at least 1 element
de9d42d
to
b26ec13
Compare
Problem solved
Short description of the bug fixed or feature added
PR-Codex overview
This PR focuses on improving the handling of block explorer URLs in the
thirdweb
wallet integration, specifically addressing compatibility issues with Firefox by ensuring that an empty array is passed when no explorers are found.Detailed summary
blockExplorerUrls
assignment inpackages/thirdweb/src/wallets/injected/index.ts
to use?? null
instead of potentially undefined.