diff --git a/packages/core/src/utils/TypeUtil.ts b/packages/core/src/utils/TypeUtil.ts index c91ede2659..6e8f621f52 100644 --- a/packages/core/src/utils/TypeUtil.ts +++ b/packages/core/src/utils/TypeUtil.ts @@ -27,14 +27,7 @@ export interface LinkingRecord { export type ProjectId = string -export type Platform = - | 'mobile' - | 'desktop' - | 'browser' - | 'web' - | 'qrcode' - | 'unsupported' - | 'external' +export type Platform = 'mobile' | 'desktop' | 'browser' | 'web' | 'qrcode' | 'unsupported' export type ConnectorType = 'EXTERNAL' | 'WALLET_CONNECT' | 'INJECTED' | 'ANNOUNCED' | 'EMAIL' diff --git a/packages/scaffold/src/views/w3m-connecting-external-view/index.ts b/packages/scaffold/src/views/w3m-connecting-external-view/index.ts index b53656e25e..f698f848f2 100644 --- a/packages/scaffold/src/views/w3m-connecting-external-view/index.ts +++ b/packages/scaffold/src/views/w3m-connecting-external-view/index.ts @@ -1,4 +1,4 @@ -import type { BaseError, ConnectorType, Platform } from '@web3modal/core' +import type { BaseError } from '@web3modal/core' import { ConnectionController, EventsController, @@ -10,11 +10,6 @@ import { import { customElement } from '@web3modal/ui' import { W3mConnectingWidget } from '../../utils/w3m-connecting-widget/index.js' -const platformMap = { - INJECTED: 'browser', - ANNOUNCED: 'browser' -} as Record - @customElement('w3m-connecting-external-view') export class W3mConnectingExternalView extends W3mConnectingWidget { public constructor() { @@ -22,12 +17,13 @@ export class W3mConnectingExternalView extends W3mConnectingWidget { if (!this.connector) { throw new Error('w3m-connecting-view: No connector provided') } + EventsController.sendEvent({ type: 'track', event: 'SELECT_WALLET', properties: { name: this.connector.name ?? 'Unknown', - platform: platformMap[this.connector.type] ?? 'external' + platform: 'browser' } }) this.onConnect = this.onConnectProxy.bind(this)