[BUG]: Cancel dialog stays open after a network switch and cancels the invoice with the same id on the new chain
Maintainers usually reply within 2 days
Assessment
- Difficulty
- 3/5
- Estimated time
- Half a day
- Newbie friendliness
- 64/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- javascript
- Domain
- frontend
Research direction
The Sent Invoices page already clears its list on a network or account switch, so start by finding that handler and the component that owns its invoice list state; the "Confirm Invoice Cancellation" dialog evidently keeps its own copy of the invoice instead. Trace the click that calls cancelInvoice(id) and see which chain id it is bound to, then make the dialog close (or re-bind) when the switch is detected. Done means switching chains or accounts with the dialog open leaves it dismissed and no cancellation is sent to the new chain.
Written by the indexing model from the issue text.
Description
Bug Description
On Sent Invoices, the "Confirm Invoice Cancellation" dialog stays open when the wallet switches network or account. The page clears its list on the switch, but the dialog keeps the old invoice. Clicking "Yes, Cancel It" sends cancelInvoice(id) to the new chain's contract, so if you created an invoice with that id there, it gets cancelled instead.
Steps to Reproduce
- Have an unpaid sent invoice with the same id on two supported chains (e.g. Sepolia and Mordor).
- Open Sent Invoices on Sepolia and click Cancel on it.
- With the dialog open, switch the wallet to Mordor.
- The dialog is still there; click "Yes, Cancel It". The Mordor invoice is cancelled and the Sepolia one isn't.
Logs and Screenshots
Screenshot to follow.
Environment Details
- OS: Windows 11
- Browser: Chromium
- main at efa50011, tested on local anvil chains with chain ids 11155111 and 63
Impact
High - Major feature is broken (a cancelled invoice can't be restored)
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