Skip to content

Commit

Permalink
Minor updates
Browse files Browse the repository at this point in the history
  • Loading branch information
otobongfp committed Jun 3, 2024
1 parent eed4fa0 commit a1e2e54
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/pages/overview/overviewTop.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -98,14 +98,10 @@ const OverviewTop = () => {
useEffect(() => {
const getData = async () => {
try {
const apyData = await getApy();
setApy(apyData.toFixed(3) + "%");

// const marketData = await MarketInfo.getMarketInfo();
// Note MarketInfo.getMarketInfo exists here too to query marketData
// You can always switch to it, we had issues with delay in using the
// free coinGecko data sometimes, hence why there's a custom script

const response = await axios.get(`${SCRIPT}/marketInfo`);
const marketData = response.data;

Expand All @@ -119,6 +115,9 @@ const OverviewTop = () => {
? marketData?.geckoMarketCap
: marketData.estimatedMarketCap
);

const apyData = await getApy();
setApy(apyData.toFixed(3) + "%");
} catch (error) {
console.error("Error fetching data:", error);
}
Expand Down

0 comments on commit a1e2e54

Please sign in to comment.