Skip to content

Commit

Permalink
fix: ratio
Browse files Browse the repository at this point in the history
  • Loading branch information
devdanco committed Sep 25, 2023
1 parent 0ef54c1 commit da69cdb
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/utils/getRatio.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ const calculateRatio = (numerator: BN, denominator: BN) => {
};

export const getRatio = (left: BN, right: BN) => {
if (left.isZero() && right.isZero()) return BN_ZERO;
const ratios = calculateRatio(left, right);

const res = ratios[1].mul(BN_DIV_NUMERATOR_MULTIPLIER).div(ratios[0]);
Expand Down

0 comments on commit da69cdb

Please sign in to comment.