Skip to content

Snippet form submits without wallet connection #35

@chiscookeke11

Description

@chiscookeke11

Bug: Snippet form submits without wallet connection

Description

Currently, the SnippetForm allows submission even when the user wallet is not connected.

This is problematic because snippet creation should be restricted to authenticated/connected users. Right now, there is no guard condition checking wallet connection status before allowing submission.


Current Behavior

  • User can submit the snippet form.
  • API request is sent successfully.
  • No validation exists for wallet connection state.

Expected Behavior

  • If the user wallet is not connected, form submission should:

    • Prevent the API request.
    • Display a toast message (e.g., “Please connect your wallet before submitting.”).
  • If the wallet is connected, submission should proceed normally.


Proposed Temporary Solution (Mock State)

Until wallet integration is finalized, introduce a mock isConnected state


Acceptance Criteria

  • Form does not submit when isConnected is false.
  • Warning message appears if wallet is not connected.
  • Form submits normally when isConnected is true.
  • No API request is made when wallet is disconnected.

Additional Context

This will later be replaced with real wallet connection state (e.g., from Wagmi or wallet provider context).

Metadata

Metadata

Labels

Stellar WaveIssues in the Stellar wave program

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions