Skip to content

Commit

Permalink
multiply then divide
Browse files Browse the repository at this point in the history
  • Loading branch information
tubackkhoa committed Nov 3, 2023
1 parent c46e325 commit 34bd377
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions packages/oraidex-common/src/bigdecimal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,7 @@ export class BigDecimal {

private imul(other: DecimalLike) {
const otherDecimal = this.processDecimal(other);
this.bigInt *= otherDecimal.bigInt;
this.bigInt /= 10n ** BigInt(this._decimals);
this.bigInt = (this.bigInt * otherDecimal.bigInt) / 10n ** BigInt(this._decimals);
return this;
}

Expand Down

0 comments on commit 34bd377

Please sign in to comment.