Skip to content

Commit

Permalink
Update js/src/util/bn.ts
Browse files Browse the repository at this point in the history
Co-authored-by: Paul Taylor <[email protected]>
  • Loading branch information
yaooqinn and trxcllnt authored Jan 20, 2025
1 parent adc5c95 commit e48f2cc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion js/src/util/bn.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ export function bigNumToNumber<T extends BN<BigNumArray>>(bn: T, scale?: number)
const remainder = negative? -(number % denominator) : number % denominator;
const integerPart = bigIntToNumber(quotient);
const fractionPart = `${remainder}`.padStart(scale, '0');
const sign: string = negative && integerPart === 0 ? '-' : '';
const sign = negative && integerPart === 0 ? '-' : '';
return +`${sign}${integerPart}.${fractionPart}`;
}
return bigIntToNumber(number);
Expand Down

0 comments on commit e48f2cc

Please sign in to comment.