diff --git a/.changeset/lucky-fireants-mix.md b/.changeset/lucky-fireants-mix.md new file mode 100644 index 000000000..4cc898869 --- /dev/null +++ b/.changeset/lucky-fireants-mix.md @@ -0,0 +1,5 @@ +--- +'@reservoir0x/relay-kit-ui': patch +--- + +Add additional data points to switch wallet event diff --git a/packages/ui/src/components/common/TransactionModal/TransactionModalRenderer.tsx b/packages/ui/src/components/common/TransactionModal/TransactionModalRenderer.tsx index 80d202b3d..bfe4eae36 100644 --- a/packages/ui/src/components/common/TransactionModal/TransactionModalRenderer.tsx +++ b/packages/ui/src/components/common/TransactionModal/TransactionModalRenderer.tsx @@ -295,7 +295,10 @@ export const TransactionModalRenderer: FC = ({ const activeWalletChainId = await _wallet?.getChainId() if (fromToken && fromToken?.chainId !== activeWalletChainId) { - onAnalyticEvent?.(EventNames.SWAP_SWITCH_NETWORK) + onAnalyticEvent?.(EventNames.SWAP_SWITCH_NETWORK, { + activeWalletChainId, + chainId: fromToken.chainId + }) await _wallet?.switchChain(fromToken.chainId) }