Skip to content

Add wallet connection guard to Distribution and Payment Stream pages #4

@pragmaticAweds

Description

@pragmaticAweds

Context

The Offramp page properly checks isConnected and shows a "Connect Wallet" prompt when the user's wallet is disconnected (see offramp/page.tsx lines 85-130). However, the Distribution and Payment Stream pages let users fill out entire forms without a wallet connected. When they hit "Distribute Token" or "Create Stream", the transaction will fail because there's no signing wallet. This creates a frustrating experience — users do work that gets thrown away.

What Success Looks Like

  • Distribution and Payment Stream pages show a wallet connection prompt (consistent with the offramp page pattern) when no wallet is connected
  • The form/content is only rendered when isConnected is true
  • The connection prompt uses the same visual pattern as the offramp page for consistency

Implementation Guidance

  • apps/web/src/app/(overview)/offramp/page.tsx lines 85-130 — the existing "Connect Wallet" prompt pattern to replicate
  • apps/web/src/app/(overview)/distribution/page.tsx — needs the guard wrapping the form
  • apps/web/src/app/(overview)/payment-stream/page.tsx — needs the guard wrapping stream creation
  • Consider extracting a shared <WalletRequired> component rather than copy-pasting the prompt UI three times
  • Use the useWallet() hook from providers/StellarWalletProvider.tsx which exposes isConnected and openModal

Metadata

Metadata

Assignees

Labels

Stellar WaveIssues in the Stellar wave programdifficulty: mediumStandard features across multiple codebase sections

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions