Skip to content

Commit bdb0d59

Browse files
committed
Chore(deps): Bump zero-decimal-currencies from 1.2 to 1.6
1 parent c2cfa78 commit bdb0d59

4 files changed

Lines changed: 11 additions & 8 deletions

File tree

package-lock.json

Lines changed: 8 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/evershop/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@
241241
"webpackbar": "^5.0.2",
242242
"winston": "^3.3.3",
243243
"yargs": "^17.7.2",
244-
"zero-decimal-currencies": "^1.2.0"
244+
"zero-decimal-currencies": "^1.6.0"
245245
},
246246
"devDependencies": {
247247
"@parcel/watcher": "^2.5.1",

packages/evershop/src/modules/stripe/api/createPaymentIntent/createPaymentIntent.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ export default async (
4343

4444
// Create a PaymentIntent with the order amount and currency
4545
const paymentIntent = await stripe.paymentIntents.create({
46-
amount: smallestUnit.default(cart.grand_total, cart.currency),
46+
amount: parseInt(smallestUnit(cart.grand_total, cart.currency), 10),
4747
currency: cart.currency,
4848
metadata: {
4949
cart_id,

packages/evershop/src/modules/stripe/api/refundPaymentIntent/refundPaymentIntent.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ export default async (request, response, next) => {
6969
// Refund
7070
const refund = await stripe.refunds.create({
7171
payment_intent: paymentTransaction.transaction_id,
72-
amount: smallestUnit.default(amount, order.currency)
72+
amount: parseInt(smallestUnit(amount, order.currency), 10)
7373
});
7474
const chargeId =
7575
typeof refund.charge === 'string'

0 commit comments

Comments
 (0)