Skip to content

Show multi-chain wallet balances in Settings #2682

@obchain

Description

@obchain

Summary

Surface local wallet balances in Settings so users can see live multi-chain holdings without leaving the app.

Problem

OpenHuman already derives wallets for EVM, BTC, Solana, and Tron from the recovery phrase, and the core can already read live balances per chain. But there is no in-app surface to view those balances. The only way to check what is held on each address today is to issue a raw JSON-RPC call against the local core, which is not accessible to normal users.

This breaks the user mental model that "I have a wallet" should immediately answer "what is in it?". It also blocks the crypto / portfolio workflows from feeling whole — users have to leave the app and open a block explorer per chain to confirm anything.

Solution (optional)

Add a Settings → Account → Wallet Balances panel that:

  • Lists every derived wallet account with a chain badge, truncated address, and copy-to-clipboard.
  • Shows the current native-asset balance per chain, formatted with the correct decimals plus the symbol.
  • Surfaces provider health per chain (e.g. "provider unavailable" chip) when the price/RPC source is not reachable, instead of hiding the chain.
  • Exposes a Refresh affordance to re-query on demand.
  • Handles loading, error, and empty (no wallet set up yet) states with copy that points the user at Recovery Phrase.
  • Keeps signing / broadcasting out of scope — read-only balance view only.

Acceptance criteria

  • Settings entry — A "Wallet Balances" item appears under Settings → Account, alongside Recovery Phrase.
  • Multi-chain rows — Every derived wallet account (EVM, BTC, Solana, Tron) renders one row with chain badge, truncated address, copy button, and formatted balance + symbol.
  • Provider health visible — When a chain's balance provider is unreachable or unsupported, the row shows a clear chip so the user can tell "zero balance" apart from "we could not fetch".
  • Refresh — A user-triggered Refresh re-queries balances and updates the rows.
  • States — Loading, error (with Retry), and empty (with pointer to Recovery Phrase) states are all rendered with helpful copy.
  • Privacy — Reading balances does not transmit the recovery phrase or any private key off-device. Only the public address is used.
  • i18n — All user-visible strings go through the i18n loader with English values; non-English locales fall back without breaking the panel.
  • Regression safety — Unit tests cover the panel's four UI states (loading, error, empty, loaded) and the address-truncation rule.
  • Diff coverage ≥ 80% — the implementing PR meets the changed-lines coverage gate (Vitest + cargo-llvm-cov, enforced by .github/workflows/coverage.yml).

Related

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions