Skip to content

Commit

Permalink
chore: use test flag instead for static typing (#1048)
Browse files Browse the repository at this point in the history
  • Loading branch information
aforaleka authored Sep 20, 2024
1 parent af41748 commit add11be
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/lib/abacus/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ import {
import { getInputTradeOptions, getTransferInputs } from '@/state/inputsSelectors';

import { LocaleSeparators } from '../numbers';
import { testFlags } from '../testFlags';
import AbacusAnalytics from './analytics';
import AbacusChainTransaction from './dydxChainTransactions';
import AbacusFileSystem from './filesystem';
Expand Down Expand Up @@ -120,7 +121,7 @@ class AbacusStateManager {

const appConfigs = AbacusAppConfig.Companion.forWebAppWithIsolatedMargins;
appConfigs.onboardingConfigs.squidVersion = OnboardingConfig.SquidVersion.V2;
appConfigs.staticTyping = import.meta.env.MODE !== 'production';
appConfigs.staticTyping = testFlags.enableStaticTyping;

this.stateManager = new AsyncAbacusStateManager(
'',
Expand Down
4 changes: 4 additions & 0 deletions src/lib/testFlags.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,10 @@ class TestFlags {
get referralCode() {
return this.queryParams.ref;
}

get enableStaticTyping() {
return !!this.queryParams.statictyping;
}
}

export const testFlags = new TestFlags();

0 comments on commit add11be

Please sign in to comment.