Skip to content

Commit

Permalink
chore: add connect proxy error event (#2911)
Browse files Browse the repository at this point in the history
  • Loading branch information
enesozturk authored Sep 24, 2024
1 parent 48b4cf6 commit 2f4a764
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 1 deletion.
10 changes: 10 additions & 0 deletions packages/core/src/utils/TypeUtil.ts
Original file line number Diff line number Diff line change
Expand Up @@ -727,6 +727,16 @@ export type Event =
amount: number
}
}
| {
type: 'track'
event: 'CONNECT_PROXY_ERROR'
properties: {
message: string
uri: string
mobile_link: string
name: string
}
}
// Onramp Types
export type DestinationWallet = {
address: string
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,17 @@ export class W3mConnectingWcMobile extends W3mConnectingWidget {
ConnectionController.setWcLinking({ name, href })
ConnectionController.setRecentWallet(this.wallet)
CoreHelperUtil.openHref(redirect, '_self')
} catch {
} catch (e) {
EventsController.sendEvent({
type: 'track',
event: 'CONNECT_PROXY_ERROR',
properties: {
message: e instanceof Error ? e.message : 'Error parsing the deeplink',
uri: this.uri,
mobile_link: this.wallet.mobile_link,
name: this.wallet.name
}
})
this.error = true
}
}
Expand Down

0 comments on commit 2f4a764

Please sign in to comment.