[BUG] Confirmed invoices can lose their payload when local persistence fails
Maintainers usually reply within 2 days
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 52/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- javascript
Research direction
Read the failure paths in frontend/src/page/CreateInvoice.jsx lines 698–716, frontend/src/page/CreateInvoicesBatch.jsx lines 737–752, and frontend/src/page/SentInvoice.jsx lines 195–228. Trace what happens after storeInvoice() fails, then verify that confirmed invoice details remain recoverable and that batch results distinguish saved invoices from failures. Runtime reproduction and frontend tests are not yet available because the required Jest dependencies are missing.
Written by the indexing model from the issue text.
Description
Bug Description
[BUG] Confirmed invoices can lose their payload when local persistence fails
Summary
A confirmed invoice can lose its sender-side invoice details if the subsequent IndexedDB write fails. The batch creation flow can also report success and navigate away even when an individual invoice was not saved locally.
Affected files
frontend/src/page/CreateInvoice.jsx— lines 698–716frontend/src/page/CreateInvoicesBatch.jsx— lines 737–752frontend/src/page/SentInvoice.jsx— lines 195–228
Steps to reproduce
- Create an invoice and wait for its blockchain transaction to confirm.
- Simulate an IndexedDB write failure in the subsequent
storeInvoice()call. - Leave or reload the page and open Sent Invoices.
For batch creation, repeat the scenario with one invoice's local persistence failing while the other invoices succeed.
Actual behavior
- Single invoice: The application displays a storage-failure warning, but the failure branch provides no immediate recovery or export action. If the page is reloaded or left, the in-memory invoice payload can be lost.
- Batch creation: A failed
storeInvoice()call is caught and logged, but the batch can still display a success message and navigate away. - Afterward: Sent Invoices may show an on-chain-only record without the original invoice details, preventing the sender from resending the full payload.
The blockchain stores the invoice data hash rather than the complete invoice payload. A later IndexedDB backup cannot include a record that was never saved locally.
Expected behavior
When local persistence fails after a transaction is confirmed, the application should preserve a recoverable copy of the invoice details or provide a clear retry/export recovery action.
For batch creation, the application should identify invoices whose local persistence failed and clearly distinguish partial success from complete success.
Verification status
The failure paths are supported by source-code inspection. Runtime reproduction and frontend tests have not yet been completed because the inspected checkout lacks the required Jest dependencies.
Steps to Reproduce
No response
Logs and Screenshots
No response
Environment Details
No response
Impact
Critical - Application is unusable
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