diff --git a/apps/connect/package-lock.json b/apps/connect/package-lock.json index 7c1c1867..05294bd0 100644 --- a/apps/connect/package-lock.json +++ b/apps/connect/package-lock.json @@ -15,7 +15,7 @@ "@mui/material": "^5.12.1", "@tanstack/react-query": "^5.14.2", "@wormhole-foundation/sdk": "^1.0.0", - "@wormhole-foundation/wormhole-connect": "^1.1.5", + "@wormhole-foundation/wormhole-connect": "^1.1.6", "aptos": "^1.21.0", "bech32": "^2.0.0", "dompurify": "^3.0.6", @@ -17795,9 +17795,9 @@ } }, "node_modules/@wormhole-foundation/wormhole-connect": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/@wormhole-foundation/wormhole-connect/-/wormhole-connect-1.1.5.tgz", - "integrity": "sha512-OCFLjwQVMcjxb8Hue8qOHcJANsse55glonhwY7L4HPviGeDT5zvlaGo1xn+iFFHeJY/F2JRX4y9MMaaBTf2iog==", + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/@wormhole-foundation/wormhole-connect/-/wormhole-connect-1.1.6.tgz", + "integrity": "sha512-6v7p8sn1HTAY0XLmqE8VCWhwBQh9Eqafx19HXXvSP6k3oEa/G2soGZqXX0Eg2V5/gH/5hB6VvuKWSa9KoMmrVA==", "dependencies": { "@coral-xyz/anchor": "^0.29.0", "@cosmjs/cosmwasm-stargate": "^0.31.3", diff --git a/apps/connect/package.json b/apps/connect/package.json index 40baf7c7..85ce99ac 100644 --- a/apps/connect/package.json +++ b/apps/connect/package.json @@ -31,7 +31,7 @@ "@mui/material": "^5.12.1", "@tanstack/react-query": "^5.14.2", "@wormhole-foundation/sdk": "^1.0.0", - "@wormhole-foundation/wormhole-connect": "^1.1.5", + "@wormhole-foundation/wormhole-connect": "^1.1.6", "aptos": "^1.21.0", "bech32": "^2.0.0", "dompurify": "^3.0.6", diff --git a/apps/connect/src/env/common.ts b/apps/connect/src/env/common.ts index cbb1c2b7..46ea6aad 100644 --- a/apps/connect/src/env/common.ts +++ b/apps/connect/src/env/common.ts @@ -48,7 +48,7 @@ export const wormholeConnectConfigCommon: Partial = { href: `https://wormholescan.io/#/txs?address={:address}&network=${CLUSTER}`, }, menu: [], - // showInProgressWidget: true, + showInProgressWidget: true, }, network: CLUSTER, rpcs: {}, diff --git a/apps/connect/src/providers/telemetry.test.ts b/apps/connect/src/providers/telemetry.test.ts index a88d6c97..12224825 100644 --- a/apps/connect/src/providers/telemetry.test.ts +++ b/apps/connect/src/providers/telemetry.test.ts @@ -20,7 +20,7 @@ describe("telemetry", () => { fromChain: "Bsc", toChain: "arbitrum", txId: "txId", - amount: 0.0001, + amount: { amount: "1", decimals: 4 }, USDAmount: 123.456, toToken: { symbol: "osETH", diff --git a/apps/connect/src/providers/telemetry.ts b/apps/connect/src/providers/telemetry.ts index 84c17dd4..5a447bea 100644 --- a/apps/connect/src/providers/telemetry.ts +++ b/apps/connect/src/providers/telemetry.ts @@ -1,6 +1,7 @@ import mixpanel from "mixpanel-browser"; import { isPreview, isProduction } from "../utils/constants"; import type { WormholeConnectConfig } from "@wormhole-foundation/wormhole-connect"; +import { amount as sdkAmount } from "@wormhole-foundation/sdk"; export type WormholeConnectEvent = Parameters< NonNullable @@ -72,6 +73,10 @@ export const eventHandler = (e: WormholeConnectEvent) => { // Convert WormholeConnectEvent to Attributes const isTransferError = e.type === "transfer.error" || e.type === "transfer.redeem.error"; + const amount = + typeof e.details.amount === "number" + ? e.details.amount + : sdkAmount.whole(e.details.amount as sdkAmount.Amount); const attributes: { [key: string]: string | number | undefined } = { fromChain: e.details.fromChain.toString(), toChain: e.details.toChain.toString(), @@ -81,7 +86,7 @@ export const eventHandler = (e: WormholeConnectEvent) => { toTokenAddress: getTokenAddress(e.details.toToken), txId: e.details.txId, USDAmount: e.details.USDAmount, - amount: e.details.amount, + amount: amount, connectVersion: e.meta.version, connectHash: e.meta.hash, route: