Skip to content

Commit

Permalink
fix: remove stx deposit analytics
Browse files Browse the repository at this point in the history
  • Loading branch information
kyranjamie committed Dec 19, 2023
1 parent 429e37a commit 0b123eb
Show file tree
Hide file tree
Showing 8 changed files with 1 addition and 114 deletions.
43 changes: 0 additions & 43 deletions src/app/common/hooks/analytics/transactions-analytics.hooks.ts

This file was deleted.

3 changes: 0 additions & 3 deletions src/app/pages/home/home.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import { Route, useNavigate } from 'react-router-dom';

import { RouteUrls } from '@shared/route-urls';

import { useTrackFirstDeposit } from '@app/common/hooks/analytics/transactions-analytics.hooks';
import { useOnboardingState } from '@app/common/hooks/auth/use-onboarding-state';
import { useOnMount } from '@app/common/hooks/use-on-mount';
import { useRouteHeader } from '@app/common/hooks/use-route-header';
Expand All @@ -23,8 +22,6 @@ export function Home() {

const navigate = useNavigate();

useTrackFirstDeposit();

useRouteHeader(
<>
<InAppMessages />
Expand Down
16 changes: 1 addition & 15 deletions src/app/query/stacks/balance/stx-balance.hooks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,7 @@ import { Money, createMoney } from '@shared/models/money.model';
import { useCurrentStacksAccount } from '@app/store/accounts/blockchain/stacks/stacks-account.hooks';
import { accountBalanceStxKeys } from '@app/store/accounts/blockchain/stacks/stacks-account.models';

import {
useAnchoredStacksAccountBalanceQuery,
useUnanchoredStacksAccountBalanceQuery,
} from './stx-balance.query';
import { useAnchoredStacksAccountBalanceQuery } from './stx-balance.query';

export function parseBalanceResponse(balances: AddressBalanceResponse) {
const stxMoney = Object.fromEntries(
Expand All @@ -33,17 +30,6 @@ export function parseBalanceResponse(balances: AddressBalanceResponse) {
return { ...balances, stx };
}

function useUnanchoredStacksBalances(address: string) {
return useUnanchoredStacksAccountBalanceQuery(address, {
select: resp => parseBalanceResponse(resp),
});
}

export function useCurrentStacksAccountUnanchoredBalances() {
const account = useCurrentStacksAccount();
return useUnanchoredStacksBalances(account?.address ?? '');
}

export function useAnchoredStacksAccountBalances(address: string) {
return useAnchoredStacksAccountBalanceQuery(address, {
select: resp => parseBalanceResponse(resp),
Expand Down
3 changes: 0 additions & 3 deletions src/app/store/analytics/analytics.actions.ts

This file was deleted.

13 changes: 0 additions & 13 deletions src/app/store/analytics/analytics.selectors.ts

This file was deleted.

32 changes: 0 additions & 32 deletions src/app/store/analytics/analytics.slice.ts

This file was deleted.

3 changes: 0 additions & 3 deletions src/app/store/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ import { PersistPartial } from 'redux-persist/es/persistReducer';

import { persistConfig } from '@shared/storage/redux-pesist';

import { analyticsSlice } from './analytics/analytics.slice';
import { appPermissionsSlice } from './app-permissions/app-permissions.slice';
import { stxChainSlice } from './chains/stx-chain.slice';
import { inMemoryKeySlice } from './in-memory-key/in-memory-key.slice';
Expand All @@ -31,7 +30,6 @@ import { submittedTransactionsSlice } from './submitted-transactions/submitted-t
import { broadcastActionTypeToOtherFramesMiddleware } from './utils/broadcast-action-types';

export interface RootState {
analytics: ReturnType<typeof analyticsSlice.reducer>;
appPermissions: ReturnType<typeof appPermissionsSlice.reducer>;
chains: {
stx: ReturnType<typeof stxChainSlice.reducer>;
Expand All @@ -49,7 +47,6 @@ export interface RootState {
}

const appReducer = combineReducers({
analytics: analyticsSlice.reducer,
appPermissions: appPermissionsSlice.reducer,
chains: combineReducers({
stx: stxChainSlice.reducer,
Expand Down
2 changes: 0 additions & 2 deletions tests/page-object-models/onboarding.page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ const TEST_ACCOUNT_SECRET_KEY = process.env.TEST_ACCOUNT_SECRET_KEY ?? '';

// If default wallet state changes, we'll need to update this
export const testSoftwareAccountDefaultWalletState = {
analytics: { hasStxDeposits: { '1': true, '2147483648': true } },
chains: { stx: { default: { highestAccountIndex: 1, currentAccountIndex: 0 } } },
softwareKeys: {
ids: ['default'],
Expand Down Expand Up @@ -49,7 +48,6 @@ export const testSoftwareAccountDefaultWalletState = {

const testLedgerAccountDefaultWalletState = {
_persist: { rehydrated: true, version: 2 },
analytics: { hasStxDeposits: { '1': false, '2147483648': true } },
chains: { stx: { default: { currentAccountIndex: 0, highestAccountIndex: 0 } } },
softwareKeys: {
entities: {},
Expand Down

0 comments on commit 0b123eb

Please sign in to comment.