Skip to content

Commit

Permalink
Merge pull request #407 from reservoirprotocol/debugging-switch-network
Browse files Browse the repository at this point in the history
Debugging switch network
  • Loading branch information
pedromcunha authored Dec 18, 2024
2 parents 1ca4f39 + 869d7f8 commit 5ca6920
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/lucky-fireants-mix.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@reservoir0x/relay-kit-ui': patch
---

Add additional data points to switch wallet event
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,10 @@ export const TransactionModalRenderer: FC<Props> = ({
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)
}

Expand Down

0 comments on commit 5ca6920

Please sign in to comment.