Skip to content

Commit

Permalink
add version & hash to mixpanel events
Browse files Browse the repository at this point in the history
  • Loading branch information
artursapek committed Oct 8, 2024
1 parent 9683d84 commit e169968
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
9 changes: 8 additions & 1 deletion apps/connect-v1/src/providers/telemetry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,12 @@ import type { WormholeConnectConfig } from "@wormhole-foundation/wormhole-connec

export type WormholeConnectEvent = Parameters<
NonNullable<WormholeConnectConfig["eventHandler"]>
>[0];
>[0] & {
meta: {
version: string;
hash: string;
}
};

mixpanel.init(
isProduction
Expand Down Expand Up @@ -75,6 +80,8 @@ export const eventHandler = (e: WormholeConnectEvent) => {
txId: e.details.txId,
USDAmount: e.details.USDAmount,
amount: e.details.amount,
connectVersion: e.meta.version,
connectHash: e.meta.hash,
route:
{
bridge: "Manual Bridge",
Expand Down
9 changes: 8 additions & 1 deletion apps/connect/src/providers/telemetry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,12 @@ import type { WormholeConnectConfig } from "@wormhole-foundation/wormhole-connec

export type WormholeConnectEvent = Parameters<
NonNullable<WormholeConnectConfig["eventHandler"]>
>[0];
>[0] & {
meta: {
version: string;
hash: string;
}
};

mixpanel.init(
isProduction
Expand Down Expand Up @@ -75,6 +80,8 @@ export const eventHandler = (e: WormholeConnectEvent) => {
txId: e.details.txId,
USDAmount: e.details.USDAmount,
amount: e.details.amount,
connectVersion: e.meta.version,
connectHash: e.meta.hash,
route:
{
ManualTokenBridge: "Manual Bridge",
Expand Down

0 comments on commit e169968

Please sign in to comment.