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

オープン
#367 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 2 日以内に返信

@kansalakshat がすでに取り組んでいます。

2026年11月15日 から。

  • #368 @kansalakshat による — オープン

評価

難易度
3/5
見積もり時間
半日
初心者へのやさしさ
64/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
活発
技術スタック
javascript
領域
frontend

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

説明

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
主要言語
JavaScript
スター
13
フォーク
62
平均マージ
2日 14時間
マージ済み PR(30日)
18

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

StabilityNexus/Chainvoice のほかの issue

StabilityNexus/Chainvoice の issue をすべて見る

似ている issue

JavaScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。