Skip to content

Commit

Permalink
fix: decimals
Browse files Browse the repository at this point in the history
  • Loading branch information
foodaka committed Aug 26, 2024
1 parent 99b40c7 commit f8684ce
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,12 @@ export function calculateIncentiveAPR({
rewardTokenPriceInMarketReferenceCurrency,
priceInMarketReferenceCurrency,
totalTokenSupply,
rewardTokenDecimals,
decimals,
}: CalculateIncentiveAPRRequest): string {
const emissionPerSecondNormalized = normalizeBN(
emissionPerSecond,
decimals,
rewardTokenDecimals,
).multipliedBy(rewardTokenPriceInMarketReferenceCurrency);

if (emissionPerSecondNormalized.eq(0)) {
Expand Down
1 change: 1 addition & 0 deletions packages/math-utils/src/formatters/reserve/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -454,6 +454,7 @@ export function formatReservesAndIncentives<T extends ReserveDataWithPrice>({
marketReferenceCurrencyDecimals,
marketReferencePriceInUsd,
});

return formattedReserves.map(reserve => {
const reserveIncentive = reserveIncentives.find(
reserveIncentive =>
Expand Down

0 comments on commit f8684ce

Please sign in to comment.