Skip to content

Add Wallet Route Guards for Member Screens #49

Description

@Lakes41

Difficulty: Hard

Type: Bug

Summary

Add consistent wallet connection guards to screens that require a connected wallet so users cannot directly open member-only routes in an invalid state.

Current Behaviour

The root route redirects disconnected users to onboarding, but routes such as /guilds, /guilds/[guildId], and /settings can still be opened directly through navigation, deep links, or reload-like flows. Some of these screens assume wallet state or show member functionality even when no wallet is connected.

Expected Behaviour

Screens that require a connected wallet should show a clear wallet-required state or redirect users to the profile/onboarding flow before running wallet-scoped queries or showing member-only data.

Suggested Implementation

Create a reusable route guard or screen wrapper, such as WalletRequired, that reads the wallet store and either renders children, redirects to /profile, or shows a connect-wallet empty state. Apply it to guild list, guild detail, settings account actions, and any future wallet-scoped screens. Keep access check usable for manual verification if that is intended, but make the wallet requirement explicit where needed.

Files or Areas Likely Affected

  • app/guilds.tsx
  • app/guilds/[guildId].tsx
  • app/settings.tsx
  • app/profile.tsx
  • src/features/wallet/
  • src/components/

Acceptance Criteria

  • Disconnected users cannot access guild detail data accidentally.
  • Wallet-required screens render a clear connect-wallet state or redirect.
  • Wallet-scoped queries do not run when walletAddress is missing.
  • Deep links into wallet-required screens handle missing wallet state safely.
  • Tests cover connected and disconnected route states.

Additional Notes

Assumption: /access-check may remain usable without a connected wallet because it supports manual wallet entry. Confirm this behaviour before applying the guard to access checks.

Metadata

Metadata

Assignees

Labels

GrantFox OSSIssue tracked in GrantFox OSSMaybe RewardedIssue may be eligible for a GrantFox rewardOfficial CampaignCampaign: Official Campaign

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions