Skip to content

"Fund Invoice" and "Mark Goods Shipped" skip the confirmation step used by sibling actions in the same component #647

Description

@K1NGD4VID

Category: UX Refinement

Repository location: apps/web/components/invoice/InvoiceCard.tsx (lines ~319-359)

Problem
fundInvoice/shipInvoice are invoked directly via handleAction, while confirmDelivery/repayInvoice/defaultInvoice in the same file go through requestConfirmation. Funding an invoice deploys pool USDC on-chain and marking as shipped changes escrow state — both are irreversible, but neither gets a "review before you sign" step, unlike their siblings in the same component.

Evidence
InvoiceCard.tsx: fundInvoice/shipInvoice call handleAction directly; confirmDelivery/repayInvoice/defaultInvoice call requestConfirmation first.

Suggested implementation
Wrap the fundInvoice/shipInvoice calls in requestConfirmation, mirroring the pattern already used for the other three actions.

Acceptance criteria

  • Clicking "Fund Invoice" or "Mark Goods Shipped" shows the same confirmation dialog pattern as the other invoice actions.
  • Existing tests for the other confirmed actions are extended to cover these two.

Difficulty: Easy

Expected impact: Closes the same class of accidental-irreversible-action risk as the detail-page issue, for a different entry point.


Filed as part of the second repository-wide audit (deeper refinements following the first cleanup pass).

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 programenhancementNew feature or requestfrontendNext.js Web Application

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions