Skip to content

Commit

Permalink
enable projected apy
Browse files Browse the repository at this point in the history
  • Loading branch information
simke9445 authored and mandrean committed May 5, 2022
1 parent 539bd25 commit ff3d348
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions app/src/queries/earn/useEarnApyProjectionQuery.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import { wasmFetch, QueryClient, WasmQuery } from '@libs/query-client';
import { moneyMarket } from '@anchor-protocol/types';
import { terraNativeBalancesQuery } from '@libs/app-fns';
import { useAnchorQuery } from 'queries/useAnchorQuery';
import { useNetwork } from '@anchor-protocol/app-provider';
import { computeApy } from '@anchor-protocol/app-fns';

interface ProjectedEarnApyWasmQuery {
Expand Down Expand Up @@ -91,15 +90,10 @@ const computeNewRate = (
};

const earnApyProjectionQuery = async (
network: string,
blocksPerYear: number,
overseerContract: HumanAddr,
queryClient: QueryClient,
) => {
if (network === 'mainnet') {
return undefined;
}

const { uUST } = await terraNativeBalancesQuery(
overseerContract,
queryClient,
Expand Down Expand Up @@ -151,12 +145,9 @@ export const useEarnApyProjectionQuery =
constants: { blocksPerYear },
} = useAnchorWebapp();

const { network } = useNetwork();

return useAnchorQuery(
[
ANCHOR_QUERY_KEY.PROJECTED_EARN_APY,
network.name,
blocksPerYear,
contractAddress.moneyMarket.overseer,
queryClient,
Expand Down

2 comments on commit ff3d348

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed web-app to IPFS 🚀

CID: bafybeidte3z63mak4tl7difywu6in2jd7gd3vu77ixerdkif7xjclr26ay
URL: https://dweb.link/ipfs/bafybeidte3z63mak4tl7difywu6in2jd7gd3vu77ixerdkif7xjclr26ay

@vercel
Copy link

@vercel vercel bot commented on ff3d348 May 5, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.