Skip to content

Commit

Permalink
feat: add meme prices fetch logic
Browse files Browse the repository at this point in the history
  • Loading branch information
naturexie committed Jan 13, 2025
1 parent 87ae5f2 commit feeeb0f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 9 deletions.
5 changes: 0 additions & 5 deletions screens/Market/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,6 @@ const Market = () => {
const { activeCategory: activeTab = "main" } = useAppSelector((state) => state.category);
const rows = useAvailableAssets();
const { sorting, setSorting } = useTableSorting();
// useEffect(() => {
// return () => {
// dispatch(setActiveCategory("main"));
// };
// }, [dispatch]);
useEffect(() => {
if (router?.query?.vault === "true") {
setSorting("market", "depositApy", "desc");
Expand Down
8 changes: 4 additions & 4 deletions store/helper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ export const getPrices = async ({ isMeme }: { isMeme?: boolean }): Promise<IPric
const pythResponse = await getPythPrices();
return pythResponse;
} else {
const oracleResponse = await getOraclePrices();
const oracleResponse = await getOraclePrices(isMeme);
return oracleResponse;
}
};
Expand Down Expand Up @@ -202,11 +202,11 @@ const getPythPrices = async () => {
return undefined;
}
};
const getOraclePrices = async () => {
const { view, oracleContract } = await getBurrow();
const getOraclePrices = async (isMeme?: boolean) => {
const { view, oracleContract, memeOracleContract } = await getBurrow();
try {
const priceResponse: IPrices = (await view(
oracleContract,
isMeme ? memeOracleContract : oracleContract,
ViewMethodsOracle[ViewMethodsOracle.get_price_data],
)) as IPrices;

Expand Down

0 comments on commit feeeb0f

Please sign in to comment.