File tree Expand file tree Collapse file tree 4 files changed +39
-1
lines changed
(chain)/[chain_id]/tx/[txHash]
packages/thirdweb/src/react/web/ui/Bridge/bridge-widget Expand file tree Collapse file tree 4 files changed +39
-1
lines changed Original file line number Diff line number Diff line change @@ -687,3 +687,18 @@ export function reportBridgePageLinkClick(params: {
687687} ) {
688688 posthog . capture ( "bridge page link clicked" , params ) ;
689689}
690+
691+ /**
692+ * ### Why do we need to report this event?
693+ * - To track which tokens are users are clicking on in the token list page
694+ *
695+ * ### Who is responsible for this event?
696+ * @MananTank
697+ *
698+ */
699+ export function reportTokenRowClicked ( params : {
700+ chainId : number ;
701+ tokenAddress : string ;
702+ } ) {
703+ posthog . capture ( "token row clicked" , params ) ;
704+ }
Original file line number Diff line number Diff line change @@ -311,7 +311,10 @@ function GeneericTxDetails(props: {
311311 label = "Burnt fees"
312312 tooltip = "The amount of fees that were burnt by the transaction."
313313 >
314- < p > { toEther ( block . baseFeePerGas || 0n * receipt . gasUsed ) } </ p >
314+ < p >
315+ { toEther ( ( block . baseFeePerGas || 0n ) * receipt . gasUsed ) } { " " }
316+ { chain . nativeCurrency ?. symbol }
317+ </ p >
315318 </ GridItem >
316319 </ section >
317320
Original file line number Diff line number Diff line change 33import { ArrowLeftIcon , ArrowRightIcon } from "lucide-react" ;
44import Link from "next/link" ;
55import { type Bridge , NATIVE_TOKEN_ADDRESS } from "thirdweb" ;
6+ import { reportTokenRowClicked } from "@/analytics/report" ;
67import { Avatar , AvatarFallback , AvatarImage } from "@/components/ui/avatar" ;
78import { Button } from "@/components/ui/button" ;
89import { Skeleton } from "@/components/ui/skeleton" ;
@@ -122,6 +123,12 @@ export function TokensTable(props: {
122123 className = "gap-2 rounded-full bg-card hover:border-foreground/50 text-muted-foreground hover:bg-inverted hover:text-inverted-foreground"
123124 >
124125 < Link
126+ onClick = { ( ) =>
127+ reportTokenRowClicked ( {
128+ chainId : token . chainId ,
129+ tokenAddress : token . address ,
130+ } )
131+ }
125132 aria-label = { `Buy ${ token . symbol } ` }
126133 href = {
127134 token . address . toLowerCase ( ) ===
Original file line number Diff line number Diff line change 1+ import { useQuery } from "@tanstack/react-query" ;
12import { useState } from "react" ;
3+ import { trackPayEvent } from "../../../../../analytics/track/pay.js" ;
24import { defineChain } from "../../../../../chains/utils.js" ;
35import type { ThirdwebClient } from "../../../../../client/client.js" ;
46import type { SupportedFiatCurrency } from "../../../../../pay/convert/type.js" ;
@@ -242,6 +244,17 @@ export type BridgeWidgetProps = {
242244export function BridgeWidget ( props : BridgeWidgetProps ) {
243245 const [ tab , setTab ] = useState < "swap" | "buy" > ( "swap" ) ;
244246
247+ useQuery ( {
248+ queryFn : ( ) => {
249+ trackPayEvent ( {
250+ client : props . client ,
251+ event : "ub:ui:bridge_widget:render" ,
252+ } ) ;
253+ return true ;
254+ } ,
255+ queryKey : [ "bridge_widget:render" ] ,
256+ } ) ;
257+
245258 return (
246259 < CustomThemeProvider theme = { props . theme } >
247260 < EmbedContainer
You can’t perform that action at this time.
0 commit comments