Skip to content

walletStore is not persisted, so refresh funds/session state #502

Description

@therealjhay

Problemdb/walletStore.ts is deliberately non-persisted. On any page reload the wallet connection, balances, and selected network reset, forcing a re-pair even though the session cookie is still valid.

  1. All wallet state is volatile memory; a soft navigation (F5) drops it.
  2. No rehydration attempt from the authenticated session on load.
  3. Balances are re-fetched but the connector identity is lost, leaving "connect" UI despite an existing session.

Solution

  • Persist the connector session metadata (topic, network) so the app can restore on load.
  • Auto-restore the session on boot when authenticated, and only require fresh pairing when the wallet rejects.
  • Keep balances cacheable with a visibility-based refresh.

Acceptance Criteria

  • Refreshing the wallet page keeps the connection and re-fetches balances without re-pairing.
  • A consumer intentionally disconnected from the wallet app is handled gracefully.
  • Persisted wallet state is cleared on logout.
  • npm run build passes.

Note for Contributors: Write a clear PR description. Include a screencast of page refresh preserving connectivity and balances.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Stellar WaveIssues in the Stellar wave program

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions