[FEATURE] : Add financial summaries to Sent and Received invoice pages
Maintainers usually reply within 2 days
@Thushara3005 is already working on this.
Since Oct 27, 2026.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 35/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- javascript
- Domain
- blockchain, full-stack
Research direction
Start by tracing the existing invoice retrieval, pagination, and token metadata utilities used by the Sent and Received invoice pages. Identify how on-chain status and amounts are exposed, then map how each page scopes invoices and handles loading or errors. Done means both pages show complete, asset-specific summaries that remain consistent across pagination and status changes, with the listed edge cases covered by tests.
Written by the indexing model from the issue text.
Description
Feature and its Use Cases
Is your feature request related to a problem?
Currently, users need to inspect invoice records individually to understand their overall financial activity. Calculating paid amounts, outstanding balances, and cancelled invoice totals manually becomes inconvenient when managing many invoices.
Describe the solution you'd like
Add a financial summary section to both the Sent Invoices and Received Invoices pages.
The summary should display:
- Total number of invoices
- Number of paid invoices
- Number of outstanding invoices
- Number of cancelled invoices
- Total invoiced amount
- Total paid amount
- Total outstanding amount
- Total cancelled amount, where reliably calculable
Financial summaries should cover the complete supported invoice dataset, not just the rows visible on the current pagination page.
Functional requirements
1. Invoice status classification
Use authoritative on-chain invoice status:
- Paid: The invoice is paid and not cancelled.
- Outstanding: The invoice is neither paid nor cancelled.
- Cancelled: The invoice is cancelled, regardless of its paid flag if the data is inconsistent.
Cancelled invoices must not be included in outstanding totals.
2. Accurate financial calculations
- Use on-chain invoice amounts and statuses as the source of truth wherever available.
- Group totals by chain ID and normalized token address.
- Never combine different tokens or chains into one monetary total.
- Use
BigIntor equivalent integer-safe arithmetic for token base units. - Use validated token decimals when formatting amounts.
- Do not silently treat missing token metadata or invalid values as zero.
3. Pagination and performance
- Calculate totals across all invoices in the supported scope.
- Reuse the existing invoice retrieval and pagination mechanisms.
- Avoid unnecessary repeated requests or loading the same data multiple times.
- Ensure that switching pagination pages does not change the overall totals.
4. UI states and updates
- Display loading and error states when invoice data is unavailable.
- Do not present partial calculations as complete totals.
- Update summaries when invoices are paid, cancelled, or otherwise changed.
- Keep Sent and Received summaries consistent with their respective invoice lists and supported network scope.
Expected behavior
When a user opens either invoice page, Chainvoice displays the invoice counts and asset-specific financial totals. The figures remain consistent across pagination changes and update when the underlying invoice state changes.
If required data is unavailable, the interface should clearly indicate that the relevant amount cannot be calculated.
Acceptance criteria
- Summary metrics are available on both Sent and Received pages.
- Counts and totals include all invoices in the supported scope.
- Pagination does not restrict summaries to the current page.
- Paid, outstanding, and cancelled invoices are classified correctly.
- Totals are separated by chain and token address.
- Token arithmetic and decimal formatting are accurate.
- Missing metadata and retrieval failures are handled safely.
- Summaries update when invoice statuses change.
- Tests cover pagination, multiple tokens, differing decimals, cancellation, and error states.
Implementation notes
Reuse existing contract interfaces, invoice retrieval logic, pagination, and token metadata utilities wherever possible. This feature should not require smart-contract changes unless a clear technical limitation makes them necessary.
Additional Context
This feature would improve invoice visibility, reduce manual calculations, and provide users with a clearer overview of their payment activity.
Code of Conduct
- I have joined the Discord server and will post updates there
- I have searched existing issues to avoid duplicates
- Dominant language
- JavaScript
- Stars
- 13
- Forks
- 62
- Avg merge
- 2d 14h
- Merged PRs (30d)
- 18
Getting set up
- Ships a Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from StabilityNexus/Chainvoice
-
[BUG]: Smart Batch Suggestions ignore active filters and select invoices hidden from the tablePossibly taken @anshulchikhale30-p claimed this 15 days ago. Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
StabilityNexus/Chainvoice#331 · 1 comment ·
Maintainers usually reply within 2 days
-
[BUG]: Invoices with the same date are sorted out of order (ids compared as strings)Possibly taken @anshulchikhale30-p claimed this 15 days ago. Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
StabilityNexus/Chainvoice#330 · 1 comment ·
Maintainers usually reply within 2 days
-
[BUG]: Stale token-list requests can overwrite state after switching networksPossibly taken @JANAKIRAM218 claimed this 10 days ago. Openbug enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
StabilityNexus/Chainvoice#325 · 1 comment ·
Maintainers usually reply within 2 days
-
[BUG]: Invoice PDF totals overlap the footer with 10 line itemsMay be free again A pull request for this issue was closed without being merged. Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
StabilityNexus/Chainvoice#310 · 4 comments ·
Maintainers usually reply within 2 days
-
[BUG]: Batch invoice summary truncates displayed amount precision to four decimal placesPossibly taken @JANAKIRAM218 claimed this 29 days ago. Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
StabilityNexus/Chainvoice#294 · 2 comments ·
Maintainers usually reply within 2 days
All issues in StabilityNexus/Chainvoice
Similar issues
-
Difficulty 1/5 Under an hour Newbie friendliness 62/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 2/5 Under an hour Newbie friendliness 82/100
Leonxlnx/taste-skill#216 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
all-contributors/cli#690 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day