Open
Conversation
|
🔗 Preview: https://pr-407.data.malbeclabs.com |
Run `doublezero latency --json` on the subscribing server, paste the output into Step 1 to get a ranked device table with Recommended/Next best badges and latency column. IP input and subscription flow unchanged for users without the CLI.
- Read VITE_SOLANA_RPC_URL from env (falls back to mainnet-beta) - Surface Program log lines in simulation errors instead of generic Anchor codes - Fix latency command display and decimal precision
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
ShredsSubscribePage(previously hidden behind a comment)/api/solana/ledger?simulate=true) that runs the subscribe transaction throughconnection.simulateTransaction()— program logic executes on-chain, no funds spent, no wallet signature requiredDiff Breakdown
Core logic dominates: transaction simulation hook, epoch polling hook, and subscribe page UI state.
Key files (click to expand)
web/src/components/shreds-subscribe-page.tsx— epoch counter component, simulate mode (banner, button, status states), USDC balance bypass in simulate modeweb/src/hooks/use-shred-transaction.ts—simulate()function alongsideexecute(); adds'simulating'and'simulated'statusesweb/src/hooks/use-epoch-info.ts— new hook polling/api/solana/ledgerevery 30s for epoch/slot/ETA dataweb/src/App.tsx— importsShredsSubscribePage, adds/dz/shreds/payrouteweb/src/components/sidebar.tsx— adds "Pay for Subscription" sub-item under Shreds navTesting Verification
http://localhost:5173/dz/shreds/pay?simulate=true— amber banner appears, button reflects simulate state, result shows pass/fail with program logs, no wallet popupimport.meta.env.DEV) ensures the feature is stripped from production builds