|
1 | | -import type { Ecosystem } from "src/wallets/in-app/core/wallet/types.js"; |
| 1 | +import type { Ecosystem } from "../../wallets/in-app/core/wallet/types.js"; |
2 | 2 | import type { ThirdwebClient } from "../../client/client.js"; |
3 | 3 | import { track } from "./index.js"; |
4 | 4 |
|
5 | 5 | /** |
6 | 6 | * @internal |
7 | 7 | */ |
8 | 8 | export async function trackPayEvent(args: { |
9 | | - client: ThirdwebClient; |
10 | | - ecosystem?: Ecosystem; |
11 | | - event: string; |
12 | | - walletAddress?: string; |
13 | | - walletType?: string; |
14 | | - fromToken?: string; |
15 | | - fromAmount?: string; |
16 | | - toToken?: string; |
17 | | - toAmount?: string; |
18 | | - chainId?: number; |
19 | | - dstChainId?: number; |
| 9 | + client: ThirdwebClient; |
| 10 | + ecosystem?: Ecosystem; |
| 11 | + event: string; |
| 12 | + walletAddress?: string; |
| 13 | + walletType?: string; |
| 14 | + fromToken?: string; |
| 15 | + fromAmount?: string; |
| 16 | + toToken?: string; |
| 17 | + toAmount?: string; |
| 18 | + chainId?: number; |
| 19 | + dstChainId?: number; |
20 | 20 | }) { |
21 | | - return track({ |
22 | | - client: args.client, |
23 | | - ecosystem: args.ecosystem, |
24 | | - data: { |
25 | | - source: "pay", |
26 | | - action: args.event, |
27 | | - clientId: args.client.clientId, |
28 | | - chainId: args.chainId, |
29 | | - walletAddress: args.walletAddress, |
30 | | - walletType: args.walletType, |
31 | | - tokenAddress: args.fromToken, |
32 | | - amountWei: args.fromAmount, |
33 | | - dstTokenAddress: args.toToken, |
34 | | - dstChainId: args.chainId, |
35 | | - }, |
36 | | - }); |
| 21 | + return track({ |
| 22 | + client: args.client, |
| 23 | + ecosystem: args.ecosystem, |
| 24 | + data: { |
| 25 | + source: "pay", |
| 26 | + action: args.event, |
| 27 | + clientId: args.client.clientId, |
| 28 | + chainId: args.chainId, |
| 29 | + walletAddress: args.walletAddress, |
| 30 | + walletType: args.walletType, |
| 31 | + tokenAddress: args.fromToken, |
| 32 | + amountWei: args.fromAmount, |
| 33 | + dstTokenAddress: args.toToken, |
| 34 | + dstChainId: args.chainId, |
| 35 | + }, |
| 36 | + }); |
37 | 37 | } |
0 commit comments