Skip to content

Add Freighter network validation with switch-network prompt #25

Description

@Dannyswiss1

The EVM reference site shows a "Switch to <network>" prompt when the connected wallet is on the wrong chain.
client/src/hooks/useWallet.ts fetches network via freighterApi.getNetwork() but nothing validates it against
an expected network (e.g. Testnet during development). Add an expected-network constant, a mismatch check, and a
Navbar prompt/button mirroring the reference site's UX, using Freighter's network-switch capability where
available.

Acceptance criteria

  • Expected network is a single configurable constant (not hardcoded in multiple places)
  • Navbar shows a distinct warning state when connected to the wrong network
  • A test (per Component tests for the Toast provider/queue #9) covers the mismatch-warning rendering

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions