Skip to content

Commit

Permalink
Feat/decimals apr (#590)
Browse files Browse the repository at this point in the history
* fix: decimals

* fix: dec
  • Loading branch information
foodaka authored Aug 26, 2024
1 parent 201dbe2 commit 817cc8d
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { normalize, normalizeBN, valueToBigNumber } from '../../bignumber';
import { SECONDS_PER_YEAR, WEI_DECIMALS } from '../../constants';
import { SECONDS_PER_YEAR } from '../../constants';

export interface CalculateIncentiveAPRRequest {
emissionPerSecond: string;
Expand All @@ -20,7 +20,7 @@ export function calculateIncentiveAPR({
}: CalculateIncentiveAPRRequest): string {
const emissionPerSecondNormalized = normalizeBN(
emissionPerSecond,
WEI_DECIMALS,
decimals,
).multipliedBy(rewardTokenPriceInMarketReferenceCurrency);

if (emissionPerSecondNormalized.eq(0)) {
Expand Down

0 comments on commit 817cc8d

Please sign in to comment.