Skip to content

Expose loading and error state from the useInvoiceStream hook #755

Description

@Kingsman-99

Description

useInvoiceStream returns invoice event data but does not expose a loading flag or an error field. UI components cannot distinguish between "no events yet" and "stream failed", leading to silent error states.

Acceptance Criteria

  • The hook return value includes loading: boolean (true until first event or error)
  • The hook return value includes error: Error | null
  • On stream error, loading becomes false and error is populated
  • Unit tests pass

Context

  • Target file: src/ui/hooks/useInvoiceStream.ts
  • Do not change the existing data field names in the return value

Metadata

Metadata

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions