Skip to content

Split Totals Summary Card with Per-Recipient Breakdown #513

Description

@Kingsman-99

Description

The invoice detail page shows the total amount but does not clearly summarize each recipient's absolute payment obligation alongside their percentage, forcing users to do mental arithmetic. A summary card with a per-recipient breakdown table of amounts and statuses is needed.

Technical Context

src/components/invoice/SplitSummaryCard.tsx (new) renders a card containing a <table> with columns for Recipient (truncated address), Percentage, Amount (in XLM), and Payment Status. src/hooks/useSplitCalculator.ts derives the per-recipient XLM amounts from percentage and invoice total. The card appears on both src/app/invoice/[id]/page.tsx and the public status page. Amounts are formatted with src/lib/formatters.ts's formatXLM utility.

Acceptance Criteria

  • The summary card renders one row per recipient showing their share percentage, absolute XLM amount, and payment status
  • XLM amounts are formatted to 7 decimal places (stroop precision)
  • A totals row at the bottom of the table confirms the sum equals the invoice total
  • The card is visible on both the private detail page and the public invoice status page
  • Amounts in the table update dynamically if invoice data is refreshed while the page is open
  • All CI checks (npm test, npm run build, ESLint/TypeScript) pass and the branch has no merge conflicts

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions