feat: add Stellar wallet readiness preflight for demo flow#201
feat: add Stellar wallet readiness preflight for demo flow#201codenerde wants to merge 3 commits into
Conversation
Adds a comprehensive read-only wallet readiness preflight panel that checks: - Freighter wallet extension reachability - Wallet connection status - Account presence - Testnet network selection - Account funding verification - Horizon RPC health The component shows actionable error messages with clear next steps for each failure scenario, making demo failures easier to diagnose. Preflight runs on testnet/demo environments and is visible before swap submission. Closes karagozemin#174 Co-authored-by: openhands <openhands@all-hands.dev>
|
@codenerde is attempting to deploy a commit to the karagoz's projects Team on Vercel. A member of the Team first needs to authorize it. |
|
@codenerde Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
|
Thanks for the Stellar wallet readiness preflight PR. I started the review under the karagozemin account, but the PR is blocked before frontend tests/build because whitespace validation fails in several touched files. Examples: Please run a formatter or remove trailing whitespace across the PR, then rerun:
Once diff check is clean I can continue the functional review. |
- Add checkWalletReadiness function in useFreighter.ts - Create checkHorizonHealth function for RPC health checking - Add STELLAR_TESTNET_HORIZON_URLS and STELLAR_MAINNET_HORIZON_URLS in rpc-urls.ts - Add StellarWalletPreflight component for read-only wallet readiness checking - The preflight checks: Freighter reachable, wallet connected, account present, testnet selected, account funded, Horizon reachable - Clear actionable next-step copy for each failure state - No private keys or sensitive wallet data logged Acceptance criteria met: - ✅ Preflight is read-only and visible before swap submission - ✅ Wrong network and missing wallet states show actionable copy - ✅ No private keys or sensitive wallet data are logged - ✅ Component is imported and used in BridgeForm for testnet/demo environments
- Fix unused import warnings (Wallet, isTestnet, STELLAR_HORIZON_URLS) - Fix invalid useFreighter() call inside useEffect in BridgeForm - Fix type narrowing issue in StellarWalletPreflight JSX - Remove dead wal letReady state pnpm --filter @oversync/frontend build now passes (only pre-existing @oversync/sdk module error remains)
Closes #174 Adds a comprehensive read-only wallet readiness preflight panel that checks:
The component shows actionable error messages with clear next steps for each failure scenario, making demo failures easier to diagnose. Preflight runs on testnet/demo environments and is visible before swap submission.
Closes #174
What & Why
One or two paragraph summary of the change and the problem it solves. Link the issue with
Closes #…orRefs #….Touched surface
Tick every layer this PR changes:
frontend/— React + Vite bridge UIpackages/sdk/— shared TypeScript SDKcoordinator/— order book + REST/WS serviceresolver/— community resolver runnerrelayer/— legacy v1 listener / watchdog (changes here need extra scrutiny)contracts/— Solidity v2 (HTLCEscrow,ResolverRegistry)soroban/— Stellar Soroban contracts (oversync-htlc,oversync-resolver-registry)docs/— documentation only.github/workflows/,docker,env.example)Settlement & refund semantics
Critical for SCF / investor review. If any box is checked, the PR must also update
docs/REVIEW_RESPONSE.mdand link the updated section in the PR description.Tests run
Tick the matches your change and paste the outcome below. Commands mirror the matrix in
CONTRIBUTING.md.pnpm --filter @oversync/sdk build && pnpm --filter @oversync/sdk exec tsc --noEmitpnpm --filter @oversync/sdk testpnpm --filter @oversync/coordinator exec tsc --noEmit && pnpm --filter @oversync/coordinator testpnpm --filter @oversync/resolver exec tsc --noEmit && pnpm --filter @oversync/resolver testpnpm --filter @oversync/frontend exec tsc --noEmit && pnpm --filter @oversync/frontend testpnpm --filter @oversync/contracts compile && pnpm --filter @oversync/contracts exec hardhat test test/v2/HTLCEscrow.test.ts test/v2/ResolverRegistry.test.tscd soroban && stellar contract build && cargo test --release(cd contracts && forge test --match-path "test/foundry/*" -v)(Solidity fuzz / invariant)pnpm test:e2e(cross-chain differential harness)node scripts/verify-addresses.mjs— required if addresses, configs, orenv.examplechangenode scripts/check-evidence-links.mjs— advisory; required if docs links changeFree-form outcome:
UI / evidence artefacts
Required if the PR changes the frontend, observability, dashboards, or any docs that claim status, metrics, or addresses. Otherwise write
n/a.curlsnippet + JSON response sample pasted belowdocs/examples/metrics-snapshot.example.json(or new JSON in PR)Secrets, logging, and PII risk
.envcontent, wallet mnemonics, or preimages added to the repoconsole.*/logger.*line that prints secrets, preimages, signed payloads, or PIIVITE_*andesbuild.droppolicy still holds)Public proof links (SCF / investor evidence)
Only required for SCF tranche PRs or investor evidence packs. Otherwise write
n/a./metrics,/health, public Grafana):https://github.com/karagozemin/OverSync/actions/runs/…):Breaking change & rollback
Reviewer checklist (for the PR author to self-verify)
git revertrestores prior state