File tree Expand file tree Collapse file tree 1 file changed +13
-7
lines changed
packages/thirdweb/src/analytics/track Expand file tree Collapse file tree 1 file changed +13
-7
lines changed Original file line number Diff line number Diff line change 1+ import type { Ecosystem } from "src/wallets/in-app/core/wallet/types.js" ;
12import type { ThirdwebClient } from "../../client/client.js" ;
23import { stringify } from "../../utils/json.js" ;
34import { track } from "./index.js" ;
45
56type SiweEvent = {
67 client : ThirdwebClient ;
8+ ecosystem ?: Ecosystem ;
79 walletAddress ?: string ;
810 walletType ?: string ;
911 chainId ?: number ;
@@ -52,12 +54,16 @@ function trackSiweEvent(
5254 type : "login:success" | "login:error" ;
5355 } ,
5456) {
55- track ( event . client , {
56- action : event . type ,
57- clientId : event . client . clientId ,
58- chainId : event . chainId ,
59- walletAddress : event . walletAddress ,
60- walletType : event . walletType ,
61- errorCode : stringify ( event . error ) ,
57+ track ( {
58+ client : event . client ,
59+ ecosystem : event . ecosystem ,
60+ data : {
61+ action : event . type ,
62+ clientId : event . client . clientId ,
63+ chainId : event . chainId ,
64+ walletAddress : event . walletAddress ,
65+ walletType : event . walletType ,
66+ errorCode : stringify ( event . error ) ,
67+ } ,
6268 } ) ;
6369}
You can’t perform that action at this time.
0 commit comments