Skip to content

Commit e729dfd

Browse files
committed
fix: using wrong indexer url
1 parent ae389f3 commit e729dfd

1 file changed

Lines changed: 9 additions & 3 deletions

File tree

  • apps/frontend/src/app/5_pages/MarketMakingPage/components/BobDepositModal/hooks

apps/frontend/src/app/5_pages/MarketMakingPage/components/BobDepositModal/hooks/useGetPoolInfo.ts

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
1+
import { useQuery } from '@tanstack/react-query';
2+
13
import { useCallback } from 'react';
24

35
import { Pool } from '@sovryn/sdk';
46

7+
import { BOB } from '../../../../../../constants/infrastructure/bob';
58
import { useCurrentChain } from '../../../../../../hooks/useChainStore';
9+
import { Environments } from '../../../../../../types/global';
10+
import { isMainnet } from '../../../../../../utils/helpers';
611
import { useGetPool } from '../../../hooks/useGetPool';
7-
import { useQuery } from '@tanstack/react-query';
8-
import { loadIndexer } from '../../../../../../lib/indexer';
912

1013
export const useGetPoolInfo = (pool: Pool) => {
1114
const chainId = useCurrentChain();
@@ -16,7 +19,10 @@ export const useGetPoolInfo = (pool: Pool) => {
1619
return '0';
1720
}
1821

19-
const poolStatsFreshEndpoint = loadIndexer(chainId).url + '/pool_stats?';
22+
const poolStatsFreshEndpoint =
23+
(isMainnet()
24+
? BOB.indexer[Environments.Mainnet]
25+
: BOB.indexer[Environments.Testnet]) + '/pool_stats?';
2026

2127
return fetch(
2228
poolStatsFreshEndpoint +

0 commit comments

Comments
 (0)