Skip to content

Add mobile vault screen for deposit, withdraw, and escrow management - #604

Open
BigManly4 wants to merge 2 commits into
Miracle656:mainfrom
BigManly4:mobile/vault-screen-477
Open

Add mobile vault screen for deposit, withdraw, and escrow management#604
BigManly4 wants to merge 2 commits into
Miracle656:mainfrom
BigManly4:mobile/vault-screen-477

Conversation

@BigManly4

Copy link
Copy Markdown
Contributor

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 from frontend/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-sdk directly.
  • 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 — VaultSubmit and VaultFetch in lib/vault.ts — the same style as executeBulkPayout(rows, submitBatch) in the existing lib/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

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
BigManly4 requested a review from Miracle656 as a code owner August 3, 2026 15:19
@vercel

vercel Bot commented Aug 3, 2026

Copy link
Copy Markdown

@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
BigManly4 force-pushed the mobile/vault-screen-477 branch from d7720b3 to a50486e Compare August 3, 2026 15:37
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.

49. Vault screen

1 participant