[BUG]: Cancel dialog stays open after a network switch and cancels the invoice with the same id on the new chain

Open
#367 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 2 days

@kansalakshat is already working on this.

Since Nov 15, 2026.

  • #368 by @kansalakshat — open

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
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
  1. Have an unpaid sent invoice with the same id on two supported chains (e.g. Sepolia and Mordor).
  2. Open Sent Invoices on Sepolia and click Cancel on it.
  3. With the dialog open, switch the wallet to Mordor.
  4. 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.

before-2-after-switch after-2-after-switch
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

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from StabilityNexus/Chainvoice

All issues in StabilityNexus/Chainvoice

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.