File tree Expand file tree Collapse file tree
apps/frontend/src/app/5_pages/MarketMakingPage/components/BobDepositModal/hooks Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ import { useQuery } from '@tanstack/react-query' ;
2+
13import { useCallback } from 'react' ;
24
35import { Pool } from '@sovryn/sdk' ;
46
7+ import { BOB } from '../../../../../../constants/infrastructure/bob' ;
58import { useCurrentChain } from '../../../../../../hooks/useChainStore' ;
9+ import { Environments } from '../../../../../../types/global' ;
10+ import { isMainnet } from '../../../../../../utils/helpers' ;
611import { useGetPool } from '../../../hooks/useGetPool' ;
7- import { useQuery } from '@tanstack/react-query' ;
8- import { loadIndexer } from '../../../../../../lib/indexer' ;
912
1013export 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 +
You can’t perform that action at this time.
0 commit comments