Skip to content

Commit

Permalink
fix(billing): disable grantee grants query for managed deployments de…
Browse files Browse the repository at this point in the history
…posit modal
  • Loading branch information
ygrishajev committed Dec 30, 2024
1 parent 2537020 commit 91bf940
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ export const DeploymentDepositModal: React.FunctionComponent<DeploymentDepositMo
const [isCheckingDepositor, setIsCheckingDepositor] = useState(false);
const { address, isManaged, isCustodial } = useWallet();
const { balance: walletBalance } = useWalletBalance();
const { data: granteeGrants } = useGranteeGrants(address);
const { data: granteeGrants } = useGranteeGrants(address, { enabled: !isManaged });
const pricing = usePricing();
const depositData = useDenomData(denom);
const form = useForm<z.infer<typeof formSchema>>({
Expand Down
2 changes: 1 addition & 1 deletion apps/deploy-web/src/queries/useGrantsQuery.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export function useGranteeGrants(address?: string, options: { enabled?: boolean;

// TODO: ensure app is not loaded till settings are fetched
// Issue: https://github.com/akash-network/console/issues/600
options.enabled = !!address && !!settings.apiEndpoint;
options.enabled = !!options.enabled && !!address && !!settings.apiEndpoint;

return useQuery(
QueryKeys.getGranteeGrants(address || "UNDEFINED"),
Expand Down

0 comments on commit 91bf940

Please sign in to comment.