Skip to content

Feat/mobile three features - #377

Merged
El-swaggerito merged 4 commits into
Axionvera:mainfrom
Myart352:feat/mobile-three-features
Jul 27, 2026
Merged

Feat/mobile three features#377
El-swaggerito merged 4 commits into
Axionvera:mainfrom
Myart352:feat/mobile-three-features

Conversation

@Myart352

Copy link
Copy Markdown
Contributor

PR: Mobile Balance Unavailable State (#329)

Summary

Add a clear balance unavailable state that distinguishes between loading, unavailable (network error), zero balance, and known balance. This prevents misleading users with stale or missing data shown as "0 XLM".

Changes

New Files

  • src/types/balance.tsBalanceState type ('idle' | 'loading' | 'available' | 'unavailable'), BalanceStateCopy interface, and describeBalanceState() for user-facing text.
  • src/components/BalanceDisplay.tsx — Component that renders the balance card with full state support:
    • idle/loading: Activity spinner with descriptive text
    • available (positive): Bold balance with public key and last-refreshed timestamp
    • available (zero): Muted balance with zero-balance banner explaining next steps
    • unavailable: Warning-styled card with error message and Retry button
  • docs/account-funding-states.md — Documentation of balance and funding state architecture.

Modified Files

  • src/store/walletStore.ts — Added balanceState field. refreshWalletData() sets balanceState: 'loading' before fetch, 'available' on success, 'unavailable' on error.
  • app/(tabs)/index.tsx — Replaced old static balance card with BalanceDisplay component. Retry calls both refreshWalletData() and checkFundingStatus().
  • src/components/index.ts — Exported BalanceDisplay, BalanceDisplayProps.

Acceptance Criteria

  • Unavailable balance state is added
  • Zero balance remains distinct from unavailable
  • Retry action is available (Retry button + pull-to-refresh)
  • User-facing copy is clear and safe (no raw error messages)
  • Error details are safe

Testing

  • Verified no TypeScript errors in modified files
  • Balance state transitions correctly: idle → loading → available/unavailable
  • Retry action correctly triggers wallet refresh

Branch

feat/mobile-three-features

Issue

Closes #329

@El-swaggerito
El-swaggerito merged commit 187eea6 into Axionvera:main Jul 27, 2026
1 check failed
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.

Add mobile balance unavailable state

2 participants