Skip to content

Commit

Permalink
chore: add connect proxy error event
Browse files Browse the repository at this point in the history
  • Loading branch information
enesozturk committed Sep 24, 2024
1 parent 48b4cf6 commit eec2a1b
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 eec2a1b

Please sign in to comment.