Skip to content

Commit 5ca6920

Browse files
authored
Merge pull request #407 from reservoirprotocol/debugging-switch-network
Debugging switch network
2 parents 1ca4f39 + 869d7f8 commit 5ca6920

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

.changeset/lucky-fireants-mix.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@reservoir0x/relay-kit-ui': patch
3+
---
4+
5+
Add additional data points to switch wallet event

packages/ui/src/components/common/TransactionModal/TransactionModalRenderer.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,10 @@ export const TransactionModalRenderer: FC<Props> = ({
295295
const activeWalletChainId = await _wallet?.getChainId()
296296

297297
if (fromToken && fromToken?.chainId !== activeWalletChainId) {
298-
onAnalyticEvent?.(EventNames.SWAP_SWITCH_NETWORK)
298+
onAnalyticEvent?.(EventNames.SWAP_SWITCH_NETWORK, {
299+
activeWalletChainId,
300+
chainId: fromToken.chainId
301+
})
299302
await _wallet?.switchChain(fromToken.chainId)
300303
}
301304

0 commit comments

Comments
 (0)