fix: show dapp domain in typed sign V3/V4 Request from for WalletConnect#31667
fix: show dapp domain in typed sign V3/V4 Request from for WalletConnect#31667joaoloureirop wants to merge 1 commit into
Conversation
The typed sign V3/V4 confirmation read `approvalRequest.origin` for the "Request from" field. For WalletConnect (and SDK) connections that value is the permission subject (pairing topic / channelId hex), not the dapp domain, so signTypedData requests displayed a random hex string and could trigger false deceptive warnings. Use `approvalRequest.requestData.meta.url` (the dapp's self-reported URL, already used by useApprovalInfo and useOriginTrustSignalAlerts) with a fallback to `origin`. In-app browser display is unchanged; WalletConnect and SDK now show the correct domain. Fixes #29072
|
CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes. |
PR template — items to address before "Ready for review"Warnings — informational, address before merging:
See docs/readme/ready-for-review.md for the full Definition of Ready for Review. |
🔍 Smart E2E Test Selection
click to see 🤖 AI reasoning detailsE2E Test Selection: Performance Test Selection: |
Description
When connecting a dapp via WalletConnect, the connection screen shows the correct dapp domain, but the
eth_signTypedData(V3/V4) signature request screen showed a random long hex string in the "Request from" field. This caused user confusion and could trigger false deceptive/security warnings.Root cause: The typed sign V3/V4 confirmation component (
InfoSectionOriginAndDetails) readapprovalRequest.originfor the "Request from" value. For WalletConnect (and SDK) connections,originis the permission subject — the pairing topic / channelId hex — not the dapp domain. Other parts of the codebase (e.g.useApprovalInfo,useOriginTrustSignalAlerts) already derive the signature origin fromapprovalRequest.requestData.meta.url, which holds the dapp's self-reported URL.Solution: Use
approvalRequest.requestData.meta.urlfor the "Request from" field, falling back toapprovalRequest.originwhen the metadata URL is absent. This is consistent across connection typesChangelog
CHANGELOG entry: Fixed an issue where signTypedData requests over WalletConnect showed a random hex string instead of the dapp domain in the "Request from" field
Related issues
Fixes: #29072
Manual testing steps
Screenshots/Recordings
Before
before-wc.mov
After
after-wc.mov
Pre-merge author checklist
Pre-merge reviewer checklist