Skip to content

[TESTING] Write frontend unit tests for useFreighter hook #341

@dev-fatima-24

Description

@dev-fatima-24

Priority: high

Description

The useFreighter hook implements the SEP-10 flow and is critical to the authentication experience. Unit tests should cover the happy path and all failure modes.

Acceptance Criteria

  • Test: connect() calls POST /auth/sep10 and then POST /auth/verify
  • Test: Freighter signing failure sets error state
  • Test: backend 401 on verify sets error state
  • Test: successful connect sets isConnected: true and publicKey
  • Test: disconnect() clears JWT and resets state

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions