Skip to content

docs(testing): correct disconnect exception in FakeBitboxBehavior table#565

Merged
TaprootFreak merged 1 commit into
feat/visual-regression-pilotfrom
docs/fake-bitbox-disconnect-exception
May 23, 2026
Merged

docs(testing): correct disconnect exception in FakeBitboxBehavior table#565
TaprootFreak merged 1 commit into
feat/visual-regression-pilotfrom
docs/fake-bitbox-disconnect-exception

Conversation

@TaprootFreak
Copy link
Copy Markdown
Contributor

Summary

docs/testing.md:280 claimed FakeBitboxBehavior.disconnect throws SigningCancelledException. The fake actually throws BitboxNotConnectedException at test/helper/fake_bitbox_credentials.dart:89.

Both are distinct exception classes serving distinct intents:

Class Defined at Used for
SigningCancelledException lib/packages/wallet/exceptions/signing_cancelled_exception.dart User-cancel mid-sign
BitboxNotConnectedException lib/packages/service/dfx/exceptions/bitbox_exception.dart Disconnect / not-paired

The cancel-flow code example immediately below the table (lines 284-295) is correct and stays unchanged — it tests the cancel behavior, which legitimately surfaces as SigningCancelledException through Eip712Signer.signRegistration when the fake returns '0x'.

Discovered during

Deep audit of issue #542 (Tier 1 integration tests) — verifying the cited Tier-1 doc references against the actual fake implementation.

Test plan

  • grep -n SigningCancelledException docs/testing.md and BitboxNotConnectedException — confirmed only the one drifted line touched
  • dart analyze — markdown change, no Dart impact
  • CI green

The FakeBitboxBehavior table claimed `disconnect` throws SigningCancelledException, but the fake actually throws BitboxNotConnectedException (see test/helper/fake_bitbox_credentials.dart:89). Both are distinct exception classes:

- SigningCancelledException — user-cancel path
- BitboxNotConnectedException — disconnect / not-paired path

The cancel-flow code example below the table is correct and stays unchanged.
@TaprootFreak TaprootFreak changed the base branch from develop to feat/visual-regression-pilot May 23, 2026 21:47
@TaprootFreak TaprootFreak marked this pull request as ready for review May 23, 2026 21:48
@TaprootFreak TaprootFreak merged commit 547df22 into feat/visual-regression-pilot May 23, 2026
4 checks passed
@TaprootFreak TaprootFreak deleted the docs/fake-bitbox-disconnect-exception branch May 23, 2026 21:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant