File tree Expand file tree Collapse file tree 2 files changed +10
-3
lines changed Expand file tree Collapse file tree 2 files changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -4,11 +4,13 @@ import BigNumber from 'bignumber.js';
44import { useQuery } from '@tanstack/react-query' ;
55import { getDelegatorDelegations } from 'src/utils/search/utils' ;
66import { BECH32_PREFIX_VALOPER , BASE_DENOM } from 'src/constants/config' ;
7- import { fromBech32 } from '../../../utils/utils' ;
87import { useStake as useVerseStake } from 'src/features/cybernet/ui/hooks/useCurrentAccountStake' ;
98import { CYBERVER_CONTRACTS } from 'src/features/cybernet/constants' ;
109import { useQueryClient } from 'src/contexts/queryClient' ;
1110
11+ import { isPussyChain } from 'src/utils/chains/pussy' ;
12+ import { fromBech32 } from '../../../utils/utils' ;
13+
1214const initValue = {
1315 denom : BASE_DENOM ,
1416 amount : '0' ,
@@ -76,17 +78,18 @@ const getCommissionAmount = (data) => {
7678} ;
7779
7880function useCyberverBalance ( { address } ) {
81+ const skip = ! address || ! isPussyChain ;
7982 // will be refactored to loop
8083 const s1 = useVerseStake ( {
8184 address,
8285 contractAddress : CYBERVER_CONTRACTS [ 0 ] ,
83- skip : ! address ,
86+ skip,
8487 } ) ;
8588
8689 const s2 = useVerseStake ( {
8790 address,
8891 contractAddress : CYBERVER_CONTRACTS [ 1 ] ,
89- skip : ! address ,
92+ skip,
9093 } ) ;
9194
9295 const total1 = s1 . data ?. reduce ( ( acc , { stake } ) => acc + stake , 0 ) || 0 ;
Original file line number Diff line number Diff line change 1+ import { CHAIN_ID } from 'src/constants/config' ;
2+ import { Networks } from 'src/types/networks' ;
3+
4+ export const isPussyChain = CHAIN_ID === Networks . SPACE_PUSSY ;
You can’t perform that action at this time.
0 commit comments