fix: include correct user address in bitcoin walletconnect signing request#4886
fix: include correct user address in bitcoin walletconnect signing request#4886
Conversation
🦋 Changeset detectedLatest commit: 803b931 The changes in this PR will be included in the next version bump. This PR includes changesets to release 25 packages
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 |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
10 Skipped Deployments
|
…quest fix: include correct user address in bitcoin walletconnect signing request
309bae0 to
f015567
Compare
There was a problem hiding this comment.
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
getAccountmethod to useAccountController.getCaipAddressto 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.
packages/adapters/bitcoin/src/connectors/BitcoinWalletConnectConnector.ts
Outdated
Show resolved
Hide resolved
tomiir
left a comment
There was a problem hiding this comment.
Can we add a test where we have addresses for both networks and the correct one is selected?
Coverage Report
File Coverage
|
||||||||||||||||||||||||||||||||||||||
Description
Fixed an issue where bitcoin walletconnect signing requests did not include the correct user address
Type of change
Associated Issues
For Linear issues: Closes APKT-3637
Checklist