Repository navigation
Conversation
Coerces name, url, description and icons to the types and lengths the UI expects, falling back to the dApp's domain for a missing name. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The connection sheet, request headers and Connected Apps now get string names and urls and an array of icon urls whatever the dApp sent, and app initials accept a non-string name. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sessions whose stellar namespace doesn't list accounts are left out of the active list and disconnected, and reading the list can no longer throw. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A link with a malformed percent-encoding now shows the pairing error toast instead of throwing, and a failure reading the launch link is logged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…rows An unexpected error while handling a dApp event now rejects that event, closes its sheet and moves on to the next queued request. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
stellar_signXDR and stellar_signAndSubmitXDR now validate their xdr param before scanning or display, as the message and auth-entry methods already do. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The connection success and failure toasts now use the normalized dApp name, so a non-string or oversized name reads the same as on the connection sheet. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
When handling a dApp request throws, its event is now cleared right away, as on every other reject path. A session refresh during the teardown can no longer queue the rejected request again, and a request that arrives in that window is shown once the teardown runs. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A missing or blank name falls back to the url's host, which can be far longer than a name; the fallback is now cut to the same 100 characters. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The pairing, unsupported-chain and log-in/unlock-to-connect toasts said "App"; they now say "dApp", as the Discover screen does. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
|
iOS Simulator preview build is ready: https://github.com/stellar/freighter-mobile/releases/tag/untagged-90b77d185f88fd8f9cc9 |
Contributor
|
Android Emulator preview APK is ready: https://github.com/stellar/freighter-mobile/releases/tag/untagged-3316afa66362c56e0c1a |
CassioMG
commented
Nov 12, 2026
| } catch (error) { | ||
| // Stored sessions come from dApps; keep the last good list rather than | ||
| // letting a bad one take the app down. | ||
| logger.error( |
Contributor
Author
There was a problem hiding this comment.
this should be a warn
This was referenced Nov 12, 2026
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
dApp metadata, stored WalletConnect sessions and pairing links all come from outside the app, and a few places read them assuming a well-formed shape. This PR makes each of those places handle whatever it gets:
xdrisn't a string, as the other two methods already do.If handling a proposal or request still throws, the proposal or request is rejected and its sheet closes, instead of the error escaping.
The connection toasts also say "dApp" instead of "App", as the Discover screen does.
Lines changed
Screenshots (iPhone SE simulator on iOS 27.2, Pixel 10 Pro emulator)
uriisn't valid percent-encoding, with the app runningstellar_signXDRwith a non-stringxdrImplementation details (for agents)
What changed:
src/helpers/dappMetadata.ts(new).sanitizeDappMetadatareturnsname,description,urlandiconswith fixed types and lengths:name: up to 100 characters. A missing, blank or non-string name falls back to the url's host, capped the same way.description: up to 500 characters.url: up to 2048 characters. A longer one is dropped, not cut.icons: up to 5 string URLs of up to 2048 characters each.toConnectedDappbuilds a Connected Apps row from a stored session.freighter-mobile/src/helpers/dappMetadata.ts
Lines 41 to 103 in 3c4df7b
src/hooks/useDappMetadata.ts:getDappMetadataFromEvent, which feeds the connection sheet and the request headers, returns normalized metadata.ConnectedApps.tsxbuilds its rows withtoConnectedDapp, andAppInitialsaccepts a non-string name.src/helpers/walletKitUtil.ts:partitionAccountSessionssplits stored sessions into the active account's sessions and those whosenamespaces.stellar.accountsisn't an array of strings.getActiveSessionsleaves the second group out and disconnects them.approveSessionProposal's toasts use the normalized name.freighter-mobile/src/helpers/walletKitUtil.ts
Lines 761 to 823 in 3c4df7b
src/ducks/walletKit.ts: if reading the sessions fails,fetchActiveSessionslogs it and keeps the last list.src/helpers/pairingLink.ts(new):parsePairingLinkreturnsignored,invalid, orvalidwith the decoded URI.try, becausedecodeURIComponentthrows on malformed percent-encoding, and so does React Native'sURLSearchParams.onDeepLinkuses it and shows the pairing error forinvalid, andgetInitialURL()gets a.catch.freighter-mobile/src/helpers/pairingLink.ts
Lines 23 to 42 in 3c4df7b
freighter-mobile/src/hooks/useWalletKitEventsManager.ts
Lines 84 to 115 in 3c4df7b
src/providers/WalletKitProvider.tsx:handleSessionProposalandhandleSessionRequestnow wrap the unchanged bodies, renamedprocessSessionProposalandprocessSessionRequest, in atry.prevalidateSignXdrvalidatesxdrbefore the Blockaid scan, the wayprevalidateSignMessagevalidates the message.freighter-mobile/src/providers/WalletKitProvider.tsx
Lines 768 to 794 in 3c4df7b
freighter-mobile/src/providers/WalletKitProvider.tsx
Lines 1084 to 1103 in 3c4df7b
freighter-mobile/src/providers/WalletKitProvider.tsx
Lines 1321 to 1352 in 3c4df7b
src/helpers/walletKitValidation.ts:validateSignXdrContentandValidationErrorKeys.INVALID_XDR.i18n (en, pt):
walletKit.errorInvalidPairingLinkandwalletKit.errorInvalidXdr;errorPairing,errorUnsupportedChainMessage,pleaseLoginToConnectandpleaseUnlockToConnect.Verification:
yarn test: 352 suites pass, with 5,239 tests passing and 6 skipped, as on main. The new tests cover:yarn lint:tspasses, and ESLint and Prettier pass on every changed file.uriisn't valid percent-encoding, with the app running and from a cold start: the pairing error toast.stellar_signXDRwith a non-stringxdr: rejected with a toast, and the dApp receives the error.🤖 Generated with Claude Code