Skip to content

Commit

Permalink
3s race (#5302)
Browse files Browse the repository at this point in the history
  • Loading branch information
benisgold authored and ibrahimtaveras00 committed Dec 21, 2023
1 parent 9fa6692 commit 437888c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/model/remoteConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import {
saveNetwork,
} from '@/handlers/localstorage/globalSettings';
import { web3SetHttpProvider } from '@/handlers/web3';
import { delay } from '@/utils/delay';

interface RainbowConfig extends Record<string, string | boolean | number> {
arbitrum_mainnet_rpc: string;
Expand Down Expand Up @@ -213,7 +214,7 @@ export async function initializeRemoteConfig(): Promise<void> {
minimumFetchIntervalMillis: 120_000,
});
await remoteConfig().setDefaults(DEFAULT_CONFIG);
await queryClient.prefetchQuery(QUERY_PARAMS);
await Promise.race([queryClient.prefetchQuery(QUERY_PARAMS), delay(3000)]);
}

export function getRemoteConfig(): RainbowConfig {
Expand Down

0 comments on commit 437888c

Please sign in to comment.