This document provides a quick map of the main screens and routes in the Stellar PocketPay app. The app uses Expo Router for navigation.
- Route Name:
/(tabs)/(or Home) - Purpose: Displays the total balance, public key, and recent activity preview. Serves as the main dashboard.
- Key Components:
Button,ScrollView,RefreshControl - State Dependencies:
useWalletStore(publicKey, balance, transactions, isLoading, refreshWalletData) - Related SDK Calls: N/A (Data fetched via store)
- Route Name:
/send - Purpose: Allows the user to enter payment details (destination, amount, memo) and navigate to the transaction review screen.
- Key Components:
FormField,Button,KeyboardAvoidingView,QrScanner - State Dependencies:
useWalletStore(publicKey, balance) - Related SDK Calls: N/A (validation only; signing happens in review screen)
- Route Name:
/review-transaction - Purpose: Full-screen transaction review before signing. Displays transaction details, signer info, and handles the signing handoff lifecycle (review → signing → submitting → completed/failed).
- Key Components:
ScreenHeader,Button - State Dependencies:
useWalletStore(publicKey, getSecretKey, refreshWalletData),useSignerStore(phase, review, result, error),useAppStore(contacts for label resolution) - Related SDK Calls:
sendXlmTransaction(fromsrc/services/stellar) - Design: Part of the signer handoff architecture for future external wallet support. See
docs/signer-handoff-design.md.
- Route Name:
/receive - Purpose: Displays the user's public key and QR code to receive payments.
- Key Components:
QRCode(react-native-qrcode-svg),Button - State Dependencies:
useWalletStore(publicKey) - Related SDK Calls: N/A
- Route Name:
/(tabs)/history - Purpose: Lists all recent transactions (sent and received) for the current wallet.
- Key Components:
FlatList,RefreshControl - State Dependencies:
useWalletStore(transactions, isLoading, refreshWalletData, publicKey) - Related SDK Calls: N/A (Data fetched via store)
- Route Name:
/contacts - Purpose: Manages the address book. Allows adding and removing contacts (names and public keys).
- Key Components:
FlatList,Input,Button - State Dependencies:
useAppStore(contacts, addContact, removeContact) - Related SDK Calls: N/A
- Route Name:
/(tabs)/vault - Purpose: Soroban Savings Vault UI. Shows vault balance, deposit/withdraw form, and a multi-lock list of time-locked positions.
- Key Components:
Input,Button,MultiLockList - State Dependencies:
useWalletStore(publicKey, getSecretKey),useVaultStore(balance, isConfigured, contractId, loadBalance, deposit, withdraw) - Related SDK Calls:
mockFetchVaultBalance,mockDepositToVault,mockWithdrawFromVault(fromsrc/services/stellar) - Placeholder Data: Lock fixtures from
tests/fixtures/vault.tssimulate three lock statuses (locked, matured, withdrawn). Seedocs/multi-lock.mdfor integration roadmap.