feat: replace informational bridge page with interactive CCTP cross-chain USDC bridge - #258
Merged
Sendi0011 merged 1 commit intoAug 28, 2026
Conversation
…chain USDC bridge (Closes JointSave-org#253)
Sendi0011
self-requested a review
August 28, 2026 06:48
5 tasks
olathedev
added a commit
to olathedev/Joint_Save
that referenced
this pull request
Aug 28, 2026
Resolves the conflict with the CCTP bridge feature (JointSave-org#253, PR JointSave-org#258). Only frontend/package.json conflicted: both branches appended a suite to test:unit. Kept both — lib/archival.test.ts and lib/cctp-bridge.test.ts — rather than taking a side, so neither feature's tests stop running. lib/supabase.ts, messages/en.json, and messages/es.json auto-merged cleanly; each side added its own keys in a different part of the file. Verified both features survived: archive_log/ArchiveReason and bridge_transactions are both in the Database type, and both message files carry the archival keys and all 36 bridge keys. Post-merge: 291 unit tests pass (273 + the bridge's 18), 128 component tests pass, lint clean, build compiles and registers the routes from both features.
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
Closes #253 — replaces the static informational
/bridgepage with an interactive cross-chain USDC bridge powered by Circle CCTP, letting users bring USDC from a CCTP-supported chain onto Stellar and continue into a pool deposit.What changed
frontend/lib/cctp-bridge.ts— pure, unit-tested logic (no network/React): chain metadata (CCTP_CHAINS,CCTP_DESTINATION), USDC amount/rounding/balance math, and the attestation state machine (resolveAttestationPhase,advanceBridgeStatusforpending → attested → received → deposited → failed). Exposes the typedCctpDriverseam (issue acceptance criteria) and attestation/explorer URL builders.frontend/lib/cctp-driver.ts— thin network seam: real Circle Attestation Service polling plus a deterministicdepositForBurnstand-in (no EVM wallet kit is connected in this Stellar-only app yet, so the seam returns a stable message hash and is ready to be swapped for a real implementation).frontend/lib/cctp-bridge.test.ts— 18 unit tests (state machine, amount/rounding/balance, chain metadata, URLs), registered intest:unit.frontend/app/[locale]/bridge/page.tsx— interactive bridge UI: source-chain selector, USDC amount input with live validation/conversion, progress trail, attestation polling with resume-on-reload, refund/explorer links on failure, and a hand-off to the deposit flow.frontend/app/api/bridge/transactions/route.ts+supabase/migrations/20260827010000_cctp_bridge.sql+lib/supabase.ts— typedbridge_transactionstable (RLS public-select) + API to upsert/query bridge status so progress survives page refreshes.bridgenamespace rewritten inen+es.Testing / CI
next build+ performance-budget check pass.