Skip to content

Commit

Permalink
for testing only
Browse files Browse the repository at this point in the history
  • Loading branch information
moo-onthelawn committed Apr 29, 2024
1 parent ba75515 commit 36c5dbb
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/state/accountCalculators.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
import { createSelector } from 'reselect';

import { OnboardingState, OnboardingSteps } from '@/constants/account';

import { useEnvFeatures } from '@/hooks/useEnvFeatures';
import { type DydxNetwork } from '@/constants/networks';
import { ENVIRONMENT_CONFIG_MAP } from '@/constants/networks';

import {
getOnboardingGuards,
getOnboardingState,
getSubaccountId,
getUncommittedOrderClientIds,
} from '@/state/accountSelectors';
import { getSelectedNetwork } from '@/state/appSelectors';

export const calculateOnboardingStep = createSelector(
[getOnboardingState, getOnboardingGuards],
Expand Down Expand Up @@ -91,8 +92,10 @@ export const calculateIsAccountLoading = createSelector(
* @description calculate whether positions table should render triggers column
*/
export const calculateShouldRenderTriggersInPositionsTable = createSelector(
[calculateIsAccountViewOnly],
(isAccountViewOnly: boolean) => !isAccountViewOnly && useEnvFeatures().isSlTpEnabled
[calculateIsAccountViewOnly, getSelectedNetwork],
(isAccountViewOnly: boolean, selectedNetwork: DydxNetwork) =>
!isAccountViewOnly && ENVIRONMENT_CONFIG_MAP[selectedNetwork].featureFlags.isSlTpEnabled
// (isAccountViewOnly: boolean) => !isAccountViewOnly && useEnvFeatures().isSlTpEnabled
);

/**
Expand Down

0 comments on commit 36c5dbb

Please sign in to comment.