Commit 332843f4 authored by lynn's avatar lynn Committed by GitHub

fix: add logging for token details (#4925)

logging for token details
parent cee32f97
......@@ -74,6 +74,7 @@ export enum SWAP_PRICE_UPDATE_USER_RESPONSE {
* Known pages in the app. Highest order context.
*/
export enum PageName {
TOKEN_DETAILS_PAGE = 'token-details',
TOKENS_PAGE = 'tokens-page',
POOL_PAGE = 'pool-page',
SWAP_PAGE = 'swap-page',
......
import { useWeb3React } from '@web3-react/core'
import { PageName } from 'analytics/constants'
import { Trace } from 'analytics/Trace'
import { filterTimeAtom } from 'components/Tokens/state'
import { AboutSection } from 'components/Tokens/TokenDetails/About'
import AddressSection from 'components/Tokens/TokenDetails/AddressSection'
......@@ -124,6 +126,7 @@ export default function TokenDetails() {
)
return (
<Trace page={PageName.TOKEN_DETAILS_PAGE} properties={{ tokenAddress, tokenName: chainName }} shouldLogImpression>
<TokenDetailsLayout>
{tokenQueryData && (
<>
......@@ -158,7 +161,9 @@ export default function TokenDetails() {
defaultToken={token === null ? undefined : token ?? nativeCurrency}
onReviewSwapClick={onReviewSwap}
/>
{tokenWarning && <TokenSafetyMessage tokenAddress={tokenQueryData.address ?? ''} warning={tokenWarning} />}
{tokenWarning && (
<TokenSafetyMessage tokenAddress={tokenQueryData.address ?? ''} warning={tokenWarning} />
)}
<BalanceSummary
tokenAmount={tokenBalance}
nativeCurrencyAmount={nativeCurrencyBalance}
......@@ -186,5 +191,6 @@ export default function TokenDetails() {
</>
)}
</TokenDetailsLayout>
</Trace>
)
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment