Skip to content

Fix wallet connect button showing Connected after the Freighter session expires #367

Description

@Chuks-coderr

Overview

When the Freighter wallet session expires while the app is open, the connect button continues showing "Connected" with the user's address. Subsequent transaction attempts fail with a cryptic wallet error.

Problem

Users believe they are connected and attempt to create or withdraw from streams, only receiving an error at the wallet signing step with no helpful explanation.

Proposed Solution

  • Detect wallet session expiry by catching the "no session" error from Freighter on any signing attempt
  • On detection: clear the connected state, show the connect button, and display a toast explaining the session expired
  • Proactively poll for session validity every 60 seconds when the app is focused

Acceptance Criteria

  • Wallet state cleared and connect button shown when session expiry is detected
  • Toast explains the session expired and prompts reconnect
  • Proactive session check runs on a 60-second interval while focused
  • No regression for active sessions

Metadata

Metadata

Assignees

Labels

Stellar WaveIssues in the Stellar wave programbugSomething isn't workingcomplexity: highComplex feature, refactor, or new integration

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions