Skip to content

Commit

Permalink
comments
Browse files Browse the repository at this point in the history
  • Loading branch information
yogurtandjam committed Jun 28, 2024
1 parent 379ecf2 commit 543ed7f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 17 deletions.
2 changes: 1 addition & 1 deletion src/hooks/useInitializePage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export const useInitializePage = () => {
dispatch(initializeLocalization());
const start = async () => {
const useSkip = await statsigCheckGatePromise(StatSigFlags.ffSkipMigration);
console.log('useskip thing', useSkip);
// TODO: send in an object instead, or something
abacusStateManager.setStatsigConfigs(useSkip);
abacusStateManager.start({ network: localStorageNetwork });
};
Expand Down
17 changes: 1 addition & 16 deletions src/lib/abacus/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -113,22 +113,6 @@ class AbacusStateManager {
// @ts-ignore
this.stateNotifier
);

// Temporary hack to enable statsig flags on abacus.
// This works because the statsig provider will refuse to render the application until it generates the client
// statsigCheckGatePromise(StatSigFlags.ffSkipMigration).then((useSkip) => {
// if (useSkip) appConfigs.onboardingConfigs.routerVendor = OnboardingConfig.RouterVendor.Skip;

this.stateManager = new AsyncAbacusStateManager(
'',
CURRENT_ABACUS_DEPLOYMENT,
appConfigs,
ioImplementations,
uiImplementations,
// @ts-ignore
this.stateNotifier
);
// });
}

start = ({ network }: { network?: DydxNetwork } = {}) => {
Expand Down Expand Up @@ -426,6 +410,7 @@ class AbacusStateManager {
return this.stateManager.getChainById(chainId);
};

// TODO: construct the object outside of this method, just use this to set the value
setStatsigConfigs = (useSkip: boolean) => {
this.stateManager.statsigFlags = new StatsigFlags(useSkip);
};
Expand Down

0 comments on commit 543ed7f

Please sign in to comment.