Repository navigation
fix: mf-6842 replace dead Solana RPC and token list endpoints - #12495
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
swkatmask
force-pushed
the
fix/mf-6842-solana-mainnet-rpc
branch
from
September 12, 2026 12:01
d95d797 to
212e905
Compare
swkatmask
marked this pull request as draft
September 12, 2026 12:15
swkatmask
force-pushed
the
fix/mf-6842-solana-mainnet-rpc
branch
from
September 12, 2026 12:39
212e905 to
0071ef1
Compare
swkatmask
force-pushed
the
fix/mf-6842-solana-mainnet-rpc
branch
from
September 12, 2026 12:47
98c4a28 to
a59a06c
Compare
swkatmask
force-pushed
the
fix/mf-6842-solana-mainnet-rpc
branch
from
September 12, 2026 12:55
a59a06c to
ed2bae7
Compare
swkatmask
marked this pull request as ready for review
September 12, 2026 12:59
guanbinrui
approved these changes
Sep 14, 2026
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Three issues were breaking Solana balance display; all verified against the live extension:
1. RPC endpoint (CORS preflight 403)
The Phantom app-key RPC (
solana-mainnet.phantom.app, in use since mf-2236) returns 403 on the CORS preflight, so every Solana mainnet RPC request was blocked by the browser.Replaced with an ordered failover chain — every Solana RPC call (raw
requestRPCfetches and@solana/web3.jsConnectioncalls, via thefetchoption ofConnectionConfig) retries the next endpoint on HTTP-level failure:getBalancegetProgramAccounts(SPL token list, SNS domains)public.rpc.solanavibestation.com*solana-rpc.publicnode.com*solana.api.pocket.networksolana.leorpc.com/?api_key=FREETestnet/Devnet official endpoints still work and are unchanged.
2. Token list endpoint (dead domain)
getFungibleTokenListfetched three remote lists withPromise.all, one of which (tokens.jup.ag/tokens?tags=verified) was cut off by Jupiter in 2025 (domain no longer resolves). One dead feed rejected the wholePromise.all, so token-list-dependent queries never settled.lite-api.jup.ag/tokens/v2/recentonly serves 30 recent tokens, no lookup value)Promise.all→Promise.allSettledso a dead feed degrades gracefully instead of taking down every Solana balance fetch3. Shared hook disabled for non-EVM addresses (the
-in the wallet account dialog)useFungibleTokengated its react-query with the EVMisValidAddress, so Solana base58 addresses (e.g. the nativeSo1111…112) always failed the check → the query was permanentlyenabled: false→useNativeTokenstayedisPendingforever → the wallet status box rendered-even though the balance query itself had resolved. Validate with the plugin-scopeduseWeb3Utils().isValidAddressinstead (EVM behavior unchanged).Also fixes
requestRPCerror propagation (json.message→json.error.message) and updatessecurity/content-security-policy.json(dev--cspbuilds) for the new RPC hosts.Verification
getBalance+ filteredgetProgramAccounts); matrix abovegetBalanceon the new primary → HTTP 200 with balance; old Phantom URL →TypeError: Failed to fetch(reproduces QA's report in-context)fungible-tokenquery never appeared in the react-query cache; balance query resolved (640008010) while the dialog still showed-Related Issue
Closes MF-6842