Skip to content

Commit

Permalink
Fix resolved market pricing when pool is deleted
Browse files Browse the repository at this point in the history
  • Loading branch information
Robiquet committed May 21, 2024
1 parent f782b30 commit 39ca090
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions lib/hooks/queries/useMarketSpotPrices.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,7 @@ export const useMarketSpotPrices = (

const { data: amm2Pool } = useAmm2Pool(marketId);

const enabled =
isRpcSdk(sdk) &&
marketId != null &&
!!market &&
!!(amm2Pool || (pool && basePoolBalance && balances));
const enabled = isRpcSdk(sdk) && marketId != null && !!market;

const query = useQuery(
[
Expand Down

0 comments on commit 39ca090

Please sign in to comment.