Skip to content

Commit

Permalink
bug fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
tabsheerabdullla committed Feb 19, 2024
1 parent 6a01731 commit f304668
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions talonone-service/src/handlers/effects/cart/setDiscount.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ const setDiscountHandler = (
action: 'changeCustomLineItemMoney',
customLineItemId: isDiscountApplied.id,
money: {
centAmount: value * -1,
centAmount: Math.round(value * -1 * 100),
type: 'centPrecision',
currencyCode,
fractionDigits: 2
Expand All @@ -51,7 +51,7 @@ const setDiscountHandler = (
custom,
name: { [CTP_PRODUCT_LOCALE]: name }, // we need to handle localization
money: {
centAmount: value * -1,
centAmount: Math.round(value * -1 * 100),
type: 'centPrecision',
currencyCode,
fractionDigits: 2
Expand Down
2 changes: 1 addition & 1 deletion talonone-service/src/handlers/event/cart-events.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export const cartEventsHandler = async (
name: lineItem.name[CTP_PRODUCT_LOCALE], // TODO: handle localization
sku: lineItem.variant.sku,
quantity: lineItem.quantity,
price: lineItem.price.value.centAmount
price: lineItem.price.value.centAmount/100
}))
})

Expand Down

0 comments on commit f304668

Please sign in to comment.