feat(webapp): selectable multi-token support + custom RPC network detection#146
Merged
Conversation
Custom RPC stored cluster id `solana:custom`, which ConnectorKit passes straight to the wallet as the signing chain. Wallets only sign for `solana:mainnet|devnet|testnet`, so signing failed with "Failed to sign transaction 1 of 1". Custom RPC now detects the network via getGenesisHash and overrides the matching real cluster's URL, keeping the wallet chain valid. Drops the `solana:custom` cluster and the `custom` Network entry.
The webapp was effectively USDC-locked: amounts divided by a hardcoded 1e6, "USDC" was hardcoded in labels, and delegation/account views pinned the USDC mint, despite the program and SDK being mint-agnostic. - Add a SelectedToken context (persisted to localStorage) + token picker, scoping the delegations page, wallet overview, and dashboard summary to the chosen token. - Route all amount formatting/parsing through token decimals instead of a fixed 1e6 multiplier; replace hardcoded "USDC" labels with token.symbol. - Show per-token breakdowns in the payment collection totals instead of summing across mints. - Add tokens from the UI: paste a mint, decimals are read on-chain, symbol and name are user-supplied; stored per network in localStorage.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Compute Unit Report
Generated: 2026-06-01 |
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
solana:custom, which ConnectorKit forwards to the wallet as the signing chain — wallets only sign forsolana:mainnet|devnet|testnet, so enabling delegations failed with "Failed to sign transaction 1 of 1". Custom RPC now detects the network viagetGenesisHashand overrides the matching real cluster's URL, keeping the wallet chain valid.SelectedTokencontext + token picker scoping the delegations page, wallet overview, and dashboard summary.1e6; replace hardcoded"USDC"labels withtoken.symbol.Test Plan
pnpm --filter webapp build(tsc -b + vite) — clean.pnpm --filter webapp test— 19/19 pass (incl. token-display + delegation-filters).Notes
create-plan-dialogstill uses the raw design-systemSelectfor its token field (same base-ui closed-trigger label quirk) — not changed here.