Skip to content

Commit

Permalink
Analytcs: restore WalletConnect tx origin (#4045)
Browse files Browse the repository at this point in the history
* Analytcs: restore WalletConnect tx origin

* Fix tests

* Rm redundant dev/prod branching
  • Loading branch information
katspaugh authored Aug 8, 2024
1 parent 1192f36 commit 6642e84
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ export enum WCLoadingState {
DISCONNECT = 'Disconnect',
}

// The URL of the former WalletConnect Safe App
// This is still used to differentiate these txs from Safe App txs in the analytics
const LEGACY_WC_APP_URL = 'https://apps-portal.safe.global/wallet-connect'

const walletConnectSingleton = new WalletConnectWallet()

const getWrongChainError = (dappName: string): Error => {
Expand Down Expand Up @@ -88,7 +92,7 @@ export const WalletConnectProvider = ({ children }: { children: ReactNode }) =>

// Get response from Safe Wallet Provider
return safeWalletProvider.request(event.id, event.params.request, {
url: session.peer.metadata.url,
url: LEGACY_WC_APP_URL, // required for server-side analytics
name: getPeerName(session.peer) || 'WalletConnect',
description: session.peer.metadata.description,
iconUrl: session.peer.metadata.icons[0],
Expand Down

0 comments on commit 6642e84

Please sign in to comment.