-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
feat: Add self reported dapp url in CONNECT_REQUEST_COMPLETED event #28111
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 4 commits
4b74c30
8f1e2b7
2dd397f
b97b57f
b5a8a07
ad3bb42
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -480,6 +480,14 @@ | |
| sdkV2Connection?.originatorInfo?.url ?? | ||
| ''; | ||
|
|
||
| // Should be the self reported dapp url if SDK or WC connection, null if no self reported dapp url. | ||
| // If not SDK or WC connection, i.e. a regular external connection, it should be the hostname. | ||
| const referrer = isOriginMMSDKRemoteConn | ||
| ? dappUrl | ||
| : isOriginWalletConnect | ||
| ? wc2Metadata?.url | ||
| : channelIdOrHostname; | ||
|
Check warning on line 489 in app/components/Views/MultichainAccounts/MultichainAccountConnect/MultichainAccountConnect.tsx
|
||
|
||
|
|
||
| const { domainTitle, hostname } = useMemo(() => { | ||
| let title = strings('sdk.unknown'); | ||
| let dappHostname = dappUrl || channelIdOrHostname; | ||
|
|
@@ -694,7 +702,7 @@ | |
| account_type: 'multichain', | ||
| source: eventSource, | ||
| chain_id_list: selectedChainIds, | ||
| referrer: request.metadata.origin, | ||
| referrer, | ||
| ...getApiAnalyticsProperties(isMultichainRequest), | ||
| }) | ||
| .build(), | ||
|
|
@@ -718,7 +726,7 @@ | |
| } finally { | ||
| setIsLoading(false); | ||
| } | ||
| }, [ | ||
| hostInfo, | ||
| channelIdOrHostname, | ||
| requestedRequestWithExistingPermissions, | ||
|
|
||


There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks like
dappUrlwill default to '' not null? not sure aboutwc2Metadata?.urlThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah good point. The comment is wrong. I really just want the value to be falsey here (i.e. not the channelId) when the connection is SDK or WC and the self reported dapp url is not available.