feat: add chainId to SWAP_TRANSACTION_COMPLETED (#7094)

* feat: add chainId to swap_tx_completed

* feat: time_to_sign

* test: add tests for SignedTransactionTimestampRegistry

* fix: remove time_to_sign
This commit is contained in:
eddie 2023-08-14 13:26:51 -07:00 committed by GitHub
parent 8fc98abb1a
commit 59b5e81d16
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 1 deletions

@ -75,6 +75,7 @@ export default function Updater() {
sendAnalyticsEvent(SwapEventName.SWAP_TRANSACTION_COMPLETED, { sendAnalyticsEvent(SwapEventName.SWAP_TRANSACTION_COMPLETED, {
// if timeToSwap was already set, we already logged this session // if timeToSwap was already set, we already logged this session
time_to_swap: hasReportedTimeToSwap ? undefined : elapsedTime, time_to_swap: hasReportedTimeToSwap ? undefined : elapsedTime,
chainId,
hash, hash,
...analyticsContext, ...analyticsContext,
}) })

@ -4,7 +4,7 @@ import * as Sentry from '@sentry/react'
import { BrowserTracing } from '@sentry/tracing' import { BrowserTracing } from '@sentry/tracing'
import { SharedEventName } from '@uniswap/analytics-events' import { SharedEventName } from '@uniswap/analytics-events'
import { initializeAnalytics, OriginApplication } from 'analytics' import { initializeAnalytics, OriginApplication } from 'analytics'
import { isSentryEnabled } from 'utils/env' import { isDevelopmentEnv, isSentryEnabled } from 'utils/env'
import { getEnvName, isProductionEnv } from 'utils/env' import { getEnvName, isProductionEnv } from 'utils/env'
import { v4 as uuidv4 } from 'uuid' import { v4 as uuidv4 } from 'uuid'
@ -46,4 +46,5 @@ initializeAnalytics(AMPLITUDE_DUMMY_KEY, OriginApplication.INTERFACE, {
defaultEventName: SharedEventName.PAGE_VIEWED, defaultEventName: SharedEventName.PAGE_VIEWED,
commitHash: process.env.REACT_APP_GIT_COMMIT_HASH, commitHash: process.env.REACT_APP_GIT_COMMIT_HASH,
isProductionEnv: isProductionEnv(), isProductionEnv: isProductionEnv(),
debug: isDevelopmentEnv(),
}) })