Skip to content

feat: add WalletRequired route guard for wallet-scoped screens (#49)#61

Merged
Lakes41 merged 1 commit into
Adamantine-guild:mainfrom
GBOYEE:feat/wallet-route-guards
Jun 29, 2026
Merged

feat: add WalletRequired route guard for wallet-scoped screens (#49)#61
Lakes41 merged 1 commit into
Adamantine-guild:mainfrom
GBOYEE:feat/wallet-route-guards

Conversation

@GBOYEE

@GBOYEE GBOYEE commented Jun 29, 2026

Copy link
Copy Markdown

Summary

  • Adds WalletRequired wrapper component that gates wallet-scoped screens behind a connected wallet
  • Wraps /guilds, /guilds/[guildId], and /settings routes
  • /access-check remains open per issue spec
  • Redirects to /profile when disconnected, or shows an inline connect prompt when redirect={false}
  • Full test coverage: hydration wait, redirect behavior, inline prompt rendering (4 tests)

Build result

  • npx tsc --noEmit clean
  • npx vitest run tests/walletRequired.test.tsx — 4/4 passing

…ntine-guild#49)

Adds a WalletRequired wrapper component that ensures a wallet is connected
before rendering wallet-scoped content. Redirects to /profile or shows an
inline connect prompt.

- New component: src/components/WalletRequired.tsx
- Wraps /guilds, /guilds/[guildId], /settings routes
- /access-check remains open per issue spec
- Full test suite: hydration wait, redirect, inline prompt (4 tests)
@GBOYEE

GBOYEE commented Jun 29, 2026

Copy link
Copy Markdown
Author

Hey — just a heads up on the CI: the 2 failing tests (storage.test.ts and the pre-existing session store test) are broken on main already, not introduced by this PR. I verified by running them against upstream/main and they fail there too.

This PR only touches wallet route guards — WalletRequired component + wrapping the guild/settings routes. All 4 new tests pass, typecheck is clean.

Happy to fix the broken tests separately if you want them in scope.

@Lakes41 Lakes41 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good @GBOYEE

@Lakes41 Lakes41 merged commit cdfabfe into Adamantine-guild:main Jun 29, 2026
1 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants