Skip to main content

Overview

Sovran’s wallet provides a comprehensive interface for managing your ecash balance across multiple currencies and mints. The wallet screen serves as the main hub for viewing balances, monitoring transactions, and accessing payment flows.

Primary Balance Display

The wallet displays your balance with intelligent unit toggling and multi-currency support.

Balance Component Architecture

Located in components/blocks/PrimaryBalance.tsx:144-259, the primary balance component provides:
  • Real-time balance updates from coco-cashu-react balance context
  • Multi-unit display (SAT, BTC, mBTC, USD/EUR/GBP)
  • Fiat conversion using live price feeds
  • Pending/reserved token tracking

Unit Toggling

Users can tap the balance to cycle through display modes:
Display modes:
  • Mode 0: Satoshis (100,000 sat)
  • Mode 1: Bitcoin (0.001 BTC)
  • Mode 2: Millibitcoin (1 mBTC)
  • Mode 3: Fiat equivalent (≈ $30.00 USD)

Fiat Currency Support

The wallet supports multiple fiat currencies with live price conversion:
Fiat values are calculated using real-time BTC price data:

Token State Indicators

Pending Tokens

The wallet displays pending ecash tokens that haven’t been finalized:
Pending pill features:
  • Shows total amount in pending state
  • Tappable to navigate to filtered transaction list
  • Updates in real-time as transactions finalize

Reserved Proofs

Reserved proofs represent tokens locked during operations:
Recovery options:
  1. Recover Pending Operations - Checks and recovers stuck operations
  2. Force Free All Reserved Proofs - Releases all reserved proofs (destructive)
From components/blocks/PrimaryBalance.tsx:188-233:

Account View

The account view (components/blocks/Account.tsx) provides:

Currency Icons

Dynamic currency-specific background icons:

Page Indicators

Visual dots show the current account in multi-account mode:

Balance Calculation

Balances are sourced from the coco-cashu-react balance context:
From app/(drawer)/(tabs)/index/_layout.tsx:44-55.

Main Wallet Screen

The main wallet screen (app/(drawer)/(tabs)/index/index.tsx) orchestrates:
  • Account pager for swipeable accounts
  • Transaction history with filtering
  • Monthly statistics (spent/received)
  • Bitcoin ATM locator
  • Pull-to-refresh for balance updates

Header Integration

The wallet header displays:
  • Selected mint name with avatar
  • Mint-specific balance
  • Quick access buttons (menu, NFC payment)
From app/(drawer)/(tabs)/index/_layout.tsx:56-60:

Key Features

Real-time Updates

Balance updates automatically via coco-cashu-react context subscription

Multi-currency

Support for SAT, BTC, mBTC, and fiat currencies (USD/EUR/GBP)

Token State Tracking

Visual indicators for pending and reserved ecash tokens

Recovery Tools

Built-in tools to recover stuck or reserved proofs