Skip to content

Commit 66be11e

Browse files
committed
Use toFixed for number -> Decimal conversion
1 parent df7ad45 commit 66be11e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/stargate/src/feemarket.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ export function multiplyDecimalByNumber(
4040
const normalizedValue = value.adjustFractionalDigits(fractionalDigits);
4141

4242
// Convert multiplier to Decimal with same fractional digits
43-
const multiplierDecimal = Decimal.fromUserInput(multiplier.toString(), fractionalDigits);
43+
const multiplierDecimal = Decimal.fromUserInput(multiplier.toFixed(fractionalDigits), fractionalDigits);
4444

4545
// Multiply: (value * multiplier) / 10^fractionalDigits
4646
const factor = BigInt(10) ** BigInt(fractionalDigits);

0 commit comments

Comments
 (0)