Skip to content

bug: use-batch-create has no unmount cleanup — batch keeps running after navigating away #274

Description

@Austinaminu2

Problem

`abortRef.current` (`hooks/use-batch-create.ts:45, 203-205`) is only set via the returned `cancel()` function. There's no `useEffect` cleanup that aborts automatically on unmount.

Location

`hooks/use-batch-create.ts:45, 203-205`

Impact

Navigating away mid-batch leaves the async loop running in the background, continuing to trigger wallet-signature popups for a screen the user can no longer see or cancel from.

Suggested fix

Add a `useEffect` cleanup that calls the same abort logic as `cancel()` on unmount.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Stellar WaveIssues in the Stellar wave programbugSomething isn't workingfrontendNext.js frontend

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions