Skip to content

Bug: the stream creation flow never checks or requests SEP-41 token allowance before depositing #218

Description

@Jaydbrown

Location

app/create/page.tsx (deposit flow: toStroopscreateStream)

Description

A repo-wide grep of app/create/page.tsx for "approve"/"allowance" returns nothing. If the underlying DripFactory::create_stream (or equivalent) contract call requires a pre-existing SEP-41 token allowance from the depositor to the vault/factory contract, this UI flow appears to be missing that step entirely — while two allowance-checking modules (lib/tokens.ts, lib/token-allowance-gateway.ts) sit unused in the same codebase, apparently built for exactly this purpose.

Why it matters

If allowance really is required on-chain, users hit an opaque contract-level failure on their first deposit with no actionable guidance in the UI.

Suggested fix

Confirm whether create_stream requires a pre-approved allowance; if so, wire an allowance check + approve step into app/create/page.tsx using lib/token-allowance-gateway.ts.

Acceptance criteria

  • Deposit flow checks allowance before submitting, and prompts approval if insufficient
  • Test covering the insufficient-allowance path

Metadata

Metadata

Labels

Stellar WaveIssues in the Stellar wave programbugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions