Skip to content

test(frontend): cover BTC WalletConnect address events#13160

Draft
cursor[bot] wants to merge 2 commits into
mainfrom
cursor/missing-test-coverage-52ab
Draft

test(frontend): cover BTC WalletConnect address events#13160
cursor[bot] wants to merge 2 commits into
mainfrom
cursor/missing-test-coverage-52ab

Conversation

@cursor

@cursor cursor Bot commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

Motivation

Recent BTC WalletConnect support added initial bip122_addressesChanged event emission after session approval, but the existing provider spec only asserted BTC namespace/session-property setup. That left a dApp-facing event path untested.

Changes

  • Added coverage in src/frontend/src/tests/lib/providers/wallet-connect.providers.spec.ts for emitting the initial BTC bip122_addressesChanged event to active bip122 sessions.
  • Added the complementary no-principal case to ensure BTC address data is not emitted or exposed when the principal needed to derive account metadata is unavailable.

Risky behavior now covered: BTC WalletConnect session approval now has regression coverage for both the event that dApps listen to and the privacy/safety skip path when account metadata cannot be built.

Why this materially reduces regression risk: this event path is part of the BTC WalletConnect integration contract; without it, connected dApps may miss the wallet's BTC address even though the session approval succeeds.

Tests

  • npm run prepare
  • npm run test -- src/frontend/src/tests/lib/providers/wallet-connect.providers.spec.ts
  • npx eslint --max-warnings 0 src/frontend/src/tests/lib/providers/wallet-connect.providers.spec.ts
Open in Web View Automation 

cursoragent and others added 2 commits June 22, 2026 10:05
Co-authored-by: Antonio Ventilii <AntonioVentilii@users.noreply.github.com>
Co-authored-by: Antonio Ventilii <AntonioVentilii@users.noreply.github.com>
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