Skip to content

feat(webapp): add custom RPC option to network menu#142

Merged
dev-jodee merged 1 commit into
mainfrom
feat/custom-rpc-network-menu
May 29, 2026
Merged

feat(webapp): add custom RPC option to network menu#142
dev-jodee merged 1 commit into
mainfrom
feat/custom-rpc-network-menu

Conversation

@dev-jodee
Copy link
Copy Markdown
Collaborator

Summary

  • Add a Custom RPC entry to the top-right network selector (explorer.solana.com–style) so users can point the app at their own Solana RPC URL.
  • Single saved slot in localStorage; gets its own solana:custom cluster + network config (config/networks.ts).
  • Provider includes the saved custom cluster on init and accepts the solana:custom id; clusterIdToNetwork resolves it to a new custom network.
  • Dropdown gains Add/Edit custom RPC (URL dialog with validation) and Remove custom RPC.

Test Plan

  • Run the webapp (pnpm --filter @solana/subscriptions build first, then cd webapp && pnpm dev).
  • Top-right Network menu → Add custom RPC → paste an RPC URL → Save. Page reloads, selector shows Custom, app uses that endpoint.
  • Invalid URL → toast error, no save.
  • Reopen menu → Edit custom RPC (prefilled) / Remove custom RPC (clears + reverts to default).

Notes / assumptions

  • Custom maps to mainnet token/program config by default (program id is identical across clusters; default token = mainnet USDC). Pointing at a local/forked validator means the mainnet USDC mint won't exist there — mints can be entered manually.
  • Faucet/some nav hidden on custom (clusterFilter matches exact ids) — expected.
  • Verified: tsc -b + eslint clean. Not runtime-verified (needs live RPC + wallet).

Add a "Custom RPC" entry to the top-right network selector so users
can point the app at their own Solana RPC URL. Saved as a single slot
in localStorage with its own `solana:custom` cluster and network
config (program id shared across clusters, default token = mainnet USDC).
@vercel
Copy link
Copy Markdown

vercel Bot commented May 29, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
solana-subscriptions-program Ready Ready Preview, Comment May 29, 2026 5:01pm

Request Review

@github-actions
Copy link
Copy Markdown

Compute Unit Report

Instruction Samples Min CUs Max CUs Avg CUs Est Cost (Low) [SOL] Est Cost (Med) [SOL] Est Cost (High) [SOL]
cancel_subscription 22 1720 2030 1919 0.000005000 0.000005076 0.000005959
close_subscription_authority 10 1803 1833 1806 0.000005000 0.000005072 0.000005903
create_fixed_delegation 41 3517 20022 5119 0.000005001 0.000005204 0.000007559
create_plan 97 3436 12436 4877 0.000005001 0.000005195 0.000007438
create_recurring_delegation 29 3550 11055 4849 0.000005001 0.000005193 0.000007424
delete_plan 9 359 359 359 0.000005000 0.000005014 0.000005179
init_subscription_authority 173 6226 21226 9517 0.000005002 0.000005380 0.000009758
resume_subscription 3 1723 1723 1723 0.000005000 0.000005068 0.000005861
revoke_delegation 19 255 519 353 0.000005000 0.000005014 0.000005176
subscribe 32 6485 12485 7335 0.000005002 0.000005293 0.000008667
transfer_fixed 9 5479 9966 7364 0.000005002 0.000005294 0.000008682
transfer_recurring 19 5591 10091 7071 0.000005002 0.000005282 0.000008535
transfer_subscription 10 5838 10340 7343 0.000005002 0.000005293 0.000008671
update_plan 22 424 503 477 0.000005000 0.000005019 0.000005238

Generated: 2026-05-29

@dev-jodee dev-jodee merged commit 44259f6 into main May 29, 2026
17 of 19 checks passed
@dev-jodee dev-jodee deleted the feat/custom-rpc-network-menu branch May 29, 2026 17:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant