Skip to content

Commit

Permalink
fix pool price
Browse files Browse the repository at this point in the history
  • Loading branch information
tubackkhoa committed Feb 27, 2023
1 parent cbbc832 commit e2fdcfa
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/pages/Pools/PoolDetail.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -119,10 +119,11 @@ const PoolDetail: React.FC<PoolDetailProps> = () => {
tokenMap[ORAI],
tokenMap[STABLE_DENOM]
);
// orai price
tokenPrice =
poolOraiUsdData.askPoolAmount / poolOraiUsdData.offerPoolAmount;
tokenValue = poolData.offerPoolAmount;
// calculate in orai amount
// calculate indirect
if (pairInfoData.token1.denom !== ORAI) {
const poolOraiData = await fetchPoolInfoAmount(
pairInfoData.token2,
Expand All @@ -132,8 +133,6 @@ const PoolDetail: React.FC<PoolDetailProps> = () => {
}
}

console.log(tokenPrice, tokenValue);

const usdtValue =
toDisplay(tokenValue, pairInfoData.token2.decimals) * tokenPrice;

Expand Down

0 comments on commit e2fdcfa

Please sign in to comment.