Skip to content

Commit

Permalink
rename back to analytics
Browse files Browse the repository at this point in the history
  • Loading branch information
yogurtandjam committed Aug 22, 2024
1 parent 3ffc292 commit 754eb85
Show file tree
Hide file tree
Showing 22 changed files with 21 additions and 21 deletions.
2 changes: 1 addition & 1 deletion src/hooks/useAnalytics.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import { getActiveDialog } from '@/state/dialogsSelectors';
import { getInputTradeData } from '@/state/inputsSelectors';
import { getSelectedLocale } from '@/state/localizationSelectors';

import { identify, track } from '@/lib/analytics/amplitude';
import { identify, track } from '@/lib/analytics/analytics';
import { getSelectedTradeType } from '@/lib/tradeData';

import { useAccounts } from './useAccounts';
Expand Down
2 changes: 1 addition & 1 deletion src/hooks/useLocalNotifications.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { StatSigFlags } from '@/constants/statsig';

import { useAccounts } from '@/hooks/useAccounts';

import { track } from '@/lib/analytics/amplitude';
import { track } from '@/lib/analytics/analytics';
import {
STATUS_ERROR_GRACE_PERIOD,
fetchTransferStatus,
Expand Down
2 changes: 1 addition & 1 deletion src/hooks/useNotifications.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import {
type Notifications,
} from '@/constants/notifications';

import { track } from '@/lib/analytics/amplitude';
import { track } from '@/lib/analytics/analytics';
import { isAbacusNotificationSingleSession } from '@/lib/notifications';
import { renderSvgToDataUrl } from '@/lib/renderSvgToDataUrl';

Expand Down
2 changes: 1 addition & 1 deletion src/lib/__test__/analytics.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { describe, expect, it, vi } from 'vitest';

import * as analytics from '@/constants/analytics';

import { identify, track } from '@/lib/analytics/amplitude';
import { identify, track } from '@/lib/analytics/analytics';

describe('identify', () => {
it('initializes and dispatches custom identify event with property and propertyValue', () => {
Expand Down
2 changes: 1 addition & 1 deletion src/lib/abacus/analytics.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { AbacusTrackingProtocol, Nullable } from '@/constants/abacus';
import type { AnalyticsEvent } from '@/constants/analytics';

import { track } from '../analytics/amplitude';
import { track } from '../analytics/analytics';
import { log as telemetryLog } from '../telemetry';

class AbacusAnalytics implements AbacusTrackingProtocol {
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion src/lib/telemetry.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { AnalyticsEvents } from '@/constants/analytics';
import { isDev } from '@/constants/networks';

import { track } from './analytics/amplitude';
import { track } from './analytics/analytics';

export const log = (location: string, error: Error, metadata?: any) => {
if (isDev) {
Expand Down
2 changes: 1 addition & 1 deletion src/state/localization.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { createSlice } from '@reduxjs/toolkit';
import { AnalyticsEvents } from '@/constants/analytics';
import { EN_LOCALE_DATA, EU_LOCALES, LocaleData, SupportedLocales } from '@/constants/localization';

import { track } from '@/lib/analytics/amplitude';
import { track } from '@/lib/analytics/analytics';

export interface LocalizationState {
isLocaleLoaded: boolean;
Expand Down
2 changes: 1 addition & 1 deletion src/views/ExportHistoryDropdown.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import { getIsAccountConnected, getSubaccountId } from '@/state/accountSelectors
import { useAppSelector } from '@/state/appTypes';
import { getSelectedLocale } from '@/state/localizationSelectors';

import { track } from '@/lib/analytics/amplitude';
import { track } from '@/lib/analytics/analytics';
import { exportCSV } from '@/lib/csv';
import { MustBigNumber } from '@/lib/numbers';

Expand Down
2 changes: 1 addition & 1 deletion src/views/dialogs/AcknowledgeTermsDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import { Dialog } from '@/components/Dialog';
import { Link } from '@/components/Link';
import { TermsOfUseLink } from '@/components/TermsOfUseLink';

import { track } from '@/lib/analytics/amplitude';
import { track } from '@/lib/analytics/analytics';

export const AcknowledgeTermsDialog = ({ setIsOpen }: DialogProps<AcknowledgeTermsDialogProps>) => {
const stringGetter = useStringGetter();
Expand Down
2 changes: 1 addition & 1 deletion src/views/dialogs/DepositDialog/DepositDialogContent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import { DepositForm } from '@/views/forms/AccountManagementForms/DepositForm';
import { TestnetDepositForm } from '@/views/forms/AccountManagementForms/TestnetDepositForm';

import abacusStateManager from '@/lib/abacus';
import { track } from '@/lib/analytics/amplitude';
import { track } from '@/lib/analytics/analytics';

type ElementProps = {
onDeposit?: () => void;
Expand Down
2 changes: 1 addition & 1 deletion src/views/dialogs/OnboardingDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import { TestnetDepositForm } from '@/views/forms/AccountManagementForms/Testnet
import { calculateOnboardingStep } from '@/state/accountCalculators';
import { useAppSelector } from '@/state/appTypes';

import { track } from '@/lib/analytics/amplitude';
import { track } from '@/lib/analytics/analytics';

import { DepositForm } from '../forms/AccountManagementForms/DepositForm';
import { ChooseWallet } from './OnboardingDialog/ChooseWallet';
Expand Down
2 changes: 1 addition & 1 deletion src/views/dialogs/OnboardingDialog/GenerateKeys.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import { Switch } from '@/components/Switch';
import { WithReceipt } from '@/components/WithReceipt';
import { WithTooltip } from '@/components/WithTooltip';

import { track } from '@/lib/analytics/amplitude';
import { track } from '@/lib/analytics/analytics';
import { isTruthy } from '@/lib/isTruthy';
import { log } from '@/lib/telemetry';
import { parseWalletError } from '@/lib/wallet';
Expand Down
2 changes: 1 addition & 1 deletion src/views/dialogs/OnboardingTriggerButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import { getOnboardingState } from '@/state/accountSelectors';
import { useAppDispatch, useAppSelector } from '@/state/appTypes';
import { forceOpenDialog } from '@/state/dialogs';

import { track } from '@/lib/analytics/amplitude';
import { track } from '@/lib/analytics/analytics';

type StyleProps = {
className?: string;
Expand Down
2 changes: 1 addition & 1 deletion src/views/dialogs/SharePNLAnalyticsDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import { Tag, TagSign } from '@/components/Tag';
import { useAppDispatch } from '@/state/appTypes';
import { closeDialog } from '@/state/dialogs';

import { track } from '@/lib/analytics/amplitude';
import { track } from '@/lib/analytics/analytics';
import { MustBigNumber } from '@/lib/numbers';
import { triggerTwitterIntent } from '@/lib/twitter';

Expand Down
2 changes: 1 addition & 1 deletion src/views/dialogs/StakingRewardDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ import { getSubaccountEquity } from '@/state/accountSelectors';
import { useAppSelector } from '@/state/appTypes';
import { getChartDotBackground } from '@/state/configsSelectors';

import { track } from '@/lib/analytics/amplitude';
import { track } from '@/lib/analytics/analytics';
import { BigNumberish, MustBigNumber } from '@/lib/numbers';
import { log } from '@/lib/telemetry';
import { hashFromTx } from '@/lib/txUtils';
Expand Down
2 changes: 1 addition & 1 deletion src/views/forms/AccountManagementForms/DepositForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ import { forceOpenDialog } from '@/state/dialogs';
import { getTransferInputs } from '@/state/inputsSelectors';

import abacusStateManager from '@/lib/abacus';
import { track } from '@/lib/analytics/amplitude';
import { track } from '@/lib/analytics/analytics';
import { MustBigNumber } from '@/lib/numbers';
import { getNobleChainId, NATIVE_TOKEN_ADDRESS } from '@/lib/squid';
import { log } from '@/lib/telemetry';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import {
StakeRewardButtonAndReceipt,
} from '@/views/forms/StakingForms/shared/StakeRewardButtonAndReceipt';

import { track } from '@/lib/analytics/amplitude';
import { track } from '@/lib/analytics/analytics';
import { BigNumberish, MustBigNumber } from '@/lib/numbers';

type ElementProps = {
Expand Down
2 changes: 1 addition & 1 deletion src/views/forms/StakingForms/StakeForm/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import { Tag } from '@/components/Tag';
import { WithTooltip } from '@/components/WithTooltip';
import { StakeButtonAlert } from '@/views/forms/StakingForms/shared/StakeRewardButtonAndReceipt';

import { track } from '@/lib/analytics/amplitude';
import { track } from '@/lib/analytics/analytics';
import { BigNumberish, MustBigNumber } from '@/lib/numbers';
import { log } from '@/lib/telemetry';
import { hashFromTx } from '@/lib/txUtils';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import {
StakeRewardButtonAndReceipt,
} from '@/views/forms/StakingForms/shared/StakeRewardButtonAndReceipt';

import { track } from '@/lib/analytics/amplitude';
import { track } from '@/lib/analytics/analytics';
import { BigNumberish, MustBigNumber } from '@/lib/numbers';

import { ValidatorName } from '../shared/ValidatorName';
Expand Down
2 changes: 1 addition & 1 deletion src/views/forms/StakingForms/UnstakeForm/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ import { Output, OutputType } from '@/components/Output';
import { Tag } from '@/components/Tag';
import { StakeButtonAlert } from '@/views/forms/StakingForms/shared/StakeRewardButtonAndReceipt';

import { track } from '@/lib/analytics/amplitude';
import { track } from '@/lib/analytics/analytics';
import { BigNumberish, MustBigNumber } from '@/lib/numbers';
import { log } from '@/lib/telemetry';
import { hashFromTx } from '@/lib/txUtils';
Expand Down
2 changes: 1 addition & 1 deletion src/views/forms/TradeForm/TradeSizeInputs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ import { getSelectedLocale } from '@/state/localizationSelectors';
import { getCurrentMarketConfig } from '@/state/perpetualsSelectors';

import abacusStateManager from '@/lib/abacus';
import { track } from '@/lib/analytics/amplitude';
import { track } from '@/lib/analytics/analytics';
import { MustBigNumber } from '@/lib/numbers';

import { MarketLeverageInput } from './MarketLeverageInput';
Expand Down

0 comments on commit 754eb85

Please sign in to comment.