feat: Pioneer-sourced EVM chain registry + Solana sign-message UX#57
Merged
BitHighlander merged 2 commits intodevelopfrom Apr 30, 2026
Merged
feat: Pioneer-sourced EVM chain registry + Solana sign-message UX#57BitHighlander merged 2 commits intodevelopfrom
BitHighlander merged 2 commits intodevelopfrom
Conversation
Replace static chains.ts with a Pioneer-backed registry. wallet_switchEthereumChain now does a one-step add+switch when Pioneer recognizes the chain (covers ~196 EVMs), falling back to a friendly chain-not-enabled card with a Chainlist link only when Pioneer also doesn't know it. Also fixes the Solana sign-message popup's "Unknown Method" / N-A details. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…ssage, badge cleanup
- P1: handleEthChainId/handleNetVersion accept either hex or decimal stored chainId. Pioneer-discovered chains store hex ('0x38') and parseInt('0x38', 10) was returning 0, so dApps were getting eth_chainId=0x0 after a Pioneer-driven switch.
- P2a: GET_ASSET_BALANCE and VALIDATE_ERC20_TOKEN now check blockchainDataStorage before falling to Pioneer, so user-customized RPCs in the Add Network UI take precedence on Pioneer-known chains too.
- P2b: RequestDetailsCard reads unsignedTx.messageUtf8/message for solana_signOffchainMessage (params[0] is an object there, not raw bytes — decodeMessage was producing an empty render).
- P3: ChainNotEnabledCard sends CLEAR_APPROVAL_BADGE on close; new background handler in index.ts clears the badge. Without this, dismissing the info card left the extension badge stuck on '!'.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This was referenced Apr 30, 2026
Merged
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
EIP155_CHAINStable.chains.tsis deleted; chain metadata + RPC URLs come fromGET /api/v1/discovery/caip/{caip}on demand, in-memory cached (1h TTL on hits, 1m on misses, inflight coalescing). Closes the three-way mismatch where the network dropdown advertised BNB Smart Chain butwallet_switchEthereumChainrejected it becausechains.tswas missingeip155:56.wallet_switchEthereumChain— when Pioneer recognizes the chain (~196 EVMs today), we provision the provider, persist toblockchainDataStorage, and switch immediately. The chain-not-enabled card is now a true last resort (Pioneer also doesn't know it) instead of the default response to "you didn't pre-register this chain."ChainNotEnabledCardshows the requested chainId, the dApp URL, and a Chainlist link. Surfaces in the side panel before the EIP-3326 4902 still goes back to the dApp.signMessage/signOffchainMessage/signTransaction/signAndSendTransaction.Files
chrome-extension/src/background/chains/registry.ts— Pioneer chain catalog clientchrome-extension/src/background/popup.ts—openSidePanel/setApprovalBadgeextracted (breaks circular import betweenmethods.tsand chain handlers)pages/side-panel/src/approval/ChainNotEnabledCard.tsxchrome-extension/src/background/chains.tsethereumHandler.ts(switch handler rewrite),index.ts(5 call sites + Pioneer-sourced default provider),solanaHandler.ts(timeouts),Transaction.tsx,RequestMethodCard.tsx,RequestDetailsCard.tsx,methods.ts(helper imports),feeFloors.ts(comment)Test plan
0x1388, Linea0xe708) — should add+switch in one step0xfffffe) — chain-not-enabled card surfaces with Chainlist link, dApp gets 4902web3ProviderStorageentry yet)signMessagefrom a dApp shows "Sign Solana Message" with the actual decoded message text in the popup🤖 Generated with Claude Code