Skip to content

Commit ea5987e

Browse files
authored
Merge pull request #1870 from dev-protocol/fix/checkout-basis-points-rounding
fix: prevent decimal approximation in basisPoints calc by node/js
2 parents 806896a + f34e637 commit ea5987e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/ui/components/Checkout/Checkout.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,7 @@ const submitStake = async function () {
313313
gatewayAddress: props.feeBeneficiary ?? undefined,
314314
gatewayBasisPoints:
315315
typeof props.feePercentage === 'number'
316-
? props.feePercentage * 10_000
316+
? parseInt((props.feePercentage * 10_000).toString())
317317
: undefined,
318318
payload: props.payload,
319319
}).catch((err: Error) => {
@@ -346,7 +346,7 @@ const submitStake = async function () {
346346
gatewayAddress: props.feeBeneficiary ?? undefined,
347347
gatewayBasisPoints:
348348
typeof props.feePercentage === 'number'
349-
? props.feePercentage * 10_000
349+
? parseInt((props.feePercentage * 10_000).toString())
350350
: undefined,
351351
payload: props.payload,
352352
from: _account,

0 commit comments

Comments
 (0)