Skip to content

fix: include correct user address in bitcoin walletconnect signing request#4886

Merged
0xmkh merged 3 commits intomainfrom
fix/wc-btc-signing
Aug 21, 2025
Merged

fix: include correct user address in bitcoin walletconnect signing request#4886
0xmkh merged 3 commits intomainfrom
fix/wc-btc-signing

Conversation

@0xmkh
Copy link
Copy Markdown
Collaborator

@0xmkh 0xmkh commented Aug 21, 2025

Description

Fixed an issue where bitcoin walletconnect signing requests did not include the correct user address

Type of change

  • Chore (non-breaking change that addresses non-functional tasks, maintenance, or code quality improvements)
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Associated Issues

For Linear issues: Closes APKT-3637

Checklist

  • Code in this PR is covered by automated tests (Unit tests, E2E tests)
  • My changes generate no new warnings
  • I have reviewed my own code
  • I have filled out all required sections
  • I have tested my changes on the preview link
  • Approver of this PR confirms that the changes are tested on the preview link

Copilot AI review requested due to automatic review settings August 21, 2025 10:25
@linear
Copy link
Copy Markdown

linear bot commented Aug 21, 2025

@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Aug 21, 2025

🦋 Changeset detected

Latest commit: 803b931

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 25 packages
Name Type
@reown/appkit-adapter-bitcoin Patch
pay-test-exchange Patch
@reown/appkit-adapter-ethers Patch
@reown/appkit-adapter-ethers5 Patch
@reown/appkit-adapter-solana Patch
@reown/appkit-adapter-wagmi Patch
@reown/appkit Patch
@reown/appkit-utils Patch
@reown/appkit-cdn Patch
@reown/appkit-cli Patch
@reown/appkit-codemod Patch
@reown/appkit-common Patch
@reown/appkit-controllers Patch
@reown/appkit-core Patch
@reown/appkit-experimental Patch
@reown/appkit-pay Patch
@reown/appkit-polyfills Patch
@reown/appkit-scaffold-ui Patch
@reown/appkit-siwe Patch
@reown/appkit-siwx Patch
@reown/appkit-testing Patch
@reown/appkit-ui Patch
@reown/appkit-universal-connector Patch
@reown/appkit-wallet Patch
@reown/appkit-wallet-button Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel
Copy link
Copy Markdown

vercel bot commented Aug 21, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
appkit-basic-html Ready Ready Preview Comment Aug 21, 2025 10:36am
appkit-demo Ready Ready Preview Comment Aug 21, 2025 10:36am
appkit-gallery Ready Ready Preview Comment Aug 21, 2025 10:36am
appkit-laboratory Ready Ready Preview Comment Aug 21, 2025 10:36am
10 Skipped Deployments
Project Deployment Preview Comments Updated (UTC)
appkit-basic-example Ignored Ignored Aug 21, 2025 10:36am
appkit-basic-sign-client-example Ignored Ignored Aug 21, 2025 10:36am
appkit-basic-up-example Ignored Ignored Aug 21, 2025 10:36am
appkit-ethers5-bera Ignored Ignored Aug 21, 2025 10:36am
appkit-nansen-demo Ignored Ignored Aug 21, 2025 10:36am
appkit-vue-solana Ignored Ignored Aug 21, 2025 10:36am
appkit-wagmi-cdn-example Ignored Ignored Aug 21, 2025 10:36am
ethereum-provider-wagmi-example Ignored Ignored Aug 21, 2025 10:36am
next-wagmi-solana-bitcoin-example Ignored Ignored Aug 21, 2025 10:36am
vue-wagmi-example Ignored Ignored Aug 21, 2025 10:36am

…quest

fix: include correct user address in bitcoin walletconnect signing request
@0xmkh 0xmkh force-pushed the fix/wc-btc-signing branch from 309bae0 to f015567 Compare August 21, 2025 10:25
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Fixes an issue where Bitcoin WalletConnect signing requests were not using the correct user address. The fix ensures that the Bitcoin connector retrieves and matches the correct account from the user's active session.

  • Updates the getAccount method to use AccountController.getCaipAddress to get the correct user address
  • Adds logic to find the matching account in the session namespaces using case-insensitive comparison
  • Updates tests to mock the account controller and reflect the new error message

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
packages/adapters/bitcoin/src/connectors/BitcoinWalletConnectConnector.ts Modified getAccount method to use AccountController and find matching account with proper address comparison
packages/adapters/bitcoin/tests/utils/WalletConnectProvider.test.ts Added AccountController import, mocked getCaipAddress method, and updated error message assertion
.changeset/ten-lights-watch.md Added changeset documentation for the bug fix

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Copy link
Copy Markdown
Collaborator

@tomiir tomiir left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we add a test where we have addresses for both networks and the correct one is selected?

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Aug 21, 2025

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 78.18% 34398 / 43998
🔵 Statements 78.18% 34398 / 43998
🔵 Functions 76.11% 3801 / 4994
🔵 Branches 86.72% 8139 / 9385
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
packages/adapters/bitcoin/src/connectors/BitcoinWalletConnectConnector.ts 94.3% 96.55% 92.3% 94.3% 109-110, 140-145
Generated in workflow #14468 for commit 803b931 by the Vitest Coverage Report Action

@0xmkh 0xmkh added this pull request to the merge queue Aug 21, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Aug 21, 2025
@0xmkh 0xmkh added this pull request to the merge queue Aug 21, 2025
Merged via the queue into main with commit 362c203 Aug 21, 2025
55 of 60 checks passed
@0xmkh 0xmkh deleted the fix/wc-btc-signing branch August 21, 2025 12:05
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.

4 participants