Repository navigation
Conversation
…sion Upgrades @reown/walletkit from 1.4.1 to 1.5.6, with the @walletconnect/* 2.23.10 packages it pins (from 2.23.1, and sign-client 2.23.0). The sign client we shipped applied a session update from any connected dApp: it ran the update's validation without waiting for it and never checked who sent it, so a dApp could change what its session covers, for example drop the Stellar namespace. From 2.23.10 the sign client waits for the validation and refuses an update not sent by the session's controller, which in our sessions is the wallet. A test drives the sign client's own handler to pin that. 1.5.6 rather than the newer 1.6.0: its 2.25.0 sign client also sends the hash of every signed Stellar transaction to the relay in the clear, which 2.23.10 doesn't. @walletconnect/react-native-compat stays at 2.23.1, so WalletConnect Pay's native module isn't added and WalletKit doesn't start Pay; nothing native changes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
Contributor
|
Android Emulator preview APK is ready: https://github.com/stellar/freighter-mobile/releases/tag/untagged-d87463b51521e482327f |
Contributor
|
iOS Simulator preview build is ready: https://github.com/stellar/freighter-mobile/releases/tag/untagged-35965b8b7a72dea9b2a5 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
TL;DR
Stacked on #1063. Upgrades
@reown/walletkitfrom 1.4.1 to 1.5.6, with the@walletconnect/core,typesandutils2.23.10 packages it pins (from 2.23.1; the sign client WalletKit brought was 2.23.0). Nothing native changes.The point is session updates. In WalletConnect, only the side that controls a session may change what the session covers, and in our sessions that's the wallet. The sign client we ship applied a session update from any connected dApp: it ran the update's validation without waiting for it and never checked who sent it. So a dApp could rewrite its own session, for example by dropping the Stellar namespace. From 2.23.10, the sign client waits for the validation and refuses any update the session's controller didn't send, before it changes anything.
Why 1.5.6 and not 1.6.0, the newest 1.x:
@walletconnect/react-native-compatstays at 2.23.1. Newer versions add WalletConnect Pay's native library, which WalletKit would then start at every launch, and which Android release builds' R8 rules don't cover.No
session_updatelistener is added. With this version the event can't fire for an update a dApp sends, and WalletKit doesn't forward it anyway.Lines changed
Only this PR's own changes, not those of the PRs it's stacked on.
Device check (iPhone SE simulator on iOS 27.2, Pixel 10 Pro emulator)
A local WalletConnect test client connects, sends a raw
wc_sessionUpdatewhose namespaces dropstellar, then twostellar_signMessagerequests. The first is approved and the second cancelled. What the test client logged, the same on both devices:Implementation details (for agents)
What changed:
package.json,yarn.lock:@reown/walletkit1.5.6;@walletconnect/core,@walletconnect/typesand@walletconnect/utils2.23.10. There's now a single copy of each@walletconnectpackage (before, 2.23.0 and 2.23.1 were both installed).@walletconnect/pay(JS). With compat at 2.23.1 its native module isn't there, soWalletConnectPay.isAvailable()is false and WalletKit doesn't start it.ios/Podfile.lockis unchanged.__tests__/helpers/walletConnectSessionUpdate.test.ts(new): drives the sign client's own handler for an incomingwc_sessionUpdatefrom the dApp. It expects the update refused (error 3003,UNAUTHORIZED_UPDATE_REQUEST), the session left as approved, and nosession_updateevent. It fails on 2.23.x before 2.23.10, where the update was applied.The sign client's handler, before and after:
this.isValidUpdate(...)withoutawait, thensession.update,sendResult, andsession_update.await this.isValidUpdate(...), thenif (session.peer.publicKey !== session.controller) throw getSdkError("UNAUTHORIZED_UPDATE_REQUEST").Verification:
yarn test: 356 suites pass, 5,317 tests pass and 6 are skipped. That includes the new session-update test, which fails on 2.23.0 (the update was applied) and passes on 2.23.10.yarn lint:tspasses, and ESLint and Prettier pass on the new test.ios/Podfile.lockis unchanged. Both dev apps were rebuilt from this branch and start.stellar_signXDRpayment is approved through Blockaid's notice and returns the signed XDR;main,releaseandv*.*.*. Running the iOS and Android E2E workflows on this branch before merge would cover them.Follow-ups / out of scope:
@walletconnect/pay, which every WalletKit from 1.5 brings.🤖 Generated with Claude Code