Add mobile vault screen for deposit, withdraw, and escrow management - #604
Open
BigManly4 wants to merge 2 commits into
Open
Add mobile vault screen for deposit, withdraw, and escrow management#604BigManly4 wants to merge 2 commits into
BigManly4 wants to merge 2 commits into
Conversation
Port the vault sub-account flow from the Next.js wallet (frontend/wallet/app/vault/page.tsx and frontend/wallet/lib/vault.ts) to Expo/React Native, following the conventions already established by the bulk-payout and swap mobile ports. - frontend/mobile/lib/vault.ts: typed vault domain logic ported from the wallet lib (amount/delay parsing and formatting, address validation, withdrawal status/countdown helpers). Chain submission and reads are behind injectable VaultSubmit/VaultFetch parameters, matching the executeBulkPayout(rows, submitBatch) pattern already used in lib/bulkPayout.ts, since mobile has no passkey/session signing infrastructure ported yet. - frontend/mobile/lib/escrow.ts: claimable-balance escrow helpers (createEscrow, claimEscrow, reclaimEscrow, buildEscrowClaimants). The wallet's version is a one-line re-export of sdk/src/claimableBalance.ts; that re-export does not typecheck from frontend/mobile because the mobile TS program only resolves @stellar/stellar-sdk from frontend/mobile/node_modules and there is no hoisted root node_modules, so this file mirrors that implementation locally using the @stellar/stellar-sdk dependency mobile already has. - frontend/mobile/app/vault.tsx: React Native screen covering vault creation/attach, balance display, deposit, and the full withdrawal lifecycle (queue with delay, live countdown, execute once ready, cancel while pending). Styled to match the existing dark-theme mobile screens. Signing/submission and vault reads go through stub functions declared at the top of the screen (stubSubmitVaultTx, stubFetchVaultDetails) so the flow is exercisable today and can be swapped for real Soroban RPC calls once mobile signing lands. Verified: npm run typecheck is clean, and npx expo export --platform web bundles /vault as a static route with no errors. Not verified: an interactive simulator/device render.
|
@BigManly4 is attempting to deploy a commit to the miracle656's projects Team on Vercel. A member of the Team first needs to authorize it. |
# Conflicts: # frontend/mobile/app/vault.tsx
BigManly4
force-pushed
the
mobile/vault-screen-477
branch
from
August 3, 2026 15:37
d7720b3 to
a50486e
Compare
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
Ports the vault sub-account feature from the Next.js web wallet to the Expo mobile app, following the conventions already established by the bulk-payout and swap mobile ports in this repo.
Recreates the work from #521, whose branch was deleted before merge.
What was ported
frontend/mobile/lib/vault.ts— typed vault domain logic ported fromfrontend/wallet/lib/vault.ts: XLM/stroops conversion, address validation, delay parsing, and the delay/countdown/status formatting helpers used to render the withdrawal queue. Deploy, deposit, queue withdrawal, cancel withdrawal, and execute withdrawal are all present as typed functions with the same shapes (VaultDetails, VaultWithdrawal, VaultConfig) as the wallet lib.frontend/mobile/lib/escrow.ts— claimable-balance escrow helpers (createEscrow, claimEscrow, reclaimEscrow, buildEscrowClaimants, buildClaimLink). Mirrors the sdk implementation locally instead of reaching outside the mobile package, since mobile already depends on@stellar/stellar-sdkdirectly.frontend/mobile/app/vault.tsx— a React Native screen covering: create/attach a vault, view balance (total, available, queued, delay), a deposit form, and the full withdrawal lifecycle (queue with a delay, live countdown to unlock, execute once ready, cancel while pending). Styled to match the existing dark-theme mobile screens.How signing is stubbed, and why
Mobile does not yet have the passkey/session-based signing infrastructure the web wallet uses. Chain submission and reads are behind injectable async parameters —
VaultSubmitandVaultFetchinlib/vault.ts— the same style asexecuteBulkPayout(rows, submitBatch)in the existinglib/bulkPayout.ts. The screen supplies stub implementations today so the full deposit/withdraw/queue/execute/cancel flow is exercisable end to end in the UI, and a real Soroban RPC-backed implementation can be swapped in later without touching the screen or the typed domain logic.closes #477