Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
displayAmount: (node) => formatMoney(node.amount, node.currencyCode)
};
},
order: {
...order,
shipping: adjustedOrderGroups
},
billing: {
address: billingAddressForEmail,
payments: (order.payments || []).map((payment) => ({
displayName: payment.displayName,
displayAmount: formatMoney(payment.amount * userCurrencyExchangeRate, userCurrency)
})),
subtotal: formatMoney(subtotal * userCurrencyExchangeRate, userCurrency),
shipping: formatMoney(shippingCost * userCurrencyExchangeRate, userCurrency),
taxes: formatMoney(taxes * userCurrencyExchangeRate, userCurrency),
discounts: formatMoney(discounts * userCurrencyExchangeRate, userCurrency),
refunds: formatMoney(refundTotal * userCurrencyExchangeRate, userCurrency),
total: formatMoney(
(subtotal + shippingCost + taxes - discounts) * userCurrencyExchangeRate,
userCurrency
),
adjustedTotal: formatMoney(
(amount - refundTotal) * userCurrencyExchangeRate,
userCurrency
)
},
combinedItems,
orderDate: formatDateForEmail(order.createdAt),
orderUrl,
shipping: {
address: shippingAddressForEmail,
carrier,
tracking
socialLinks: {
display: false
},
order: {
...order,
shipping: adjustedOrderGroups
},
billing: {
address: billingAddressForEmail,
payments: (order.payments || []).map((payment) => ({
displayName: payment.displayName,
displayAmount: formatMoney(payment.amount * userCurrencyExchangeRate, userCurrency)
})),
subtotal: formatMoney(subtotal * userCurrencyExchangeRate, userCurrency),
shipping: formatMoney(shippingCost * userCurrencyExchangeRate, userCurrency),
taxes: formatMoney(taxes * userCurrencyExchangeRate, userCurrency),
discounts: formatMoney(discounts * userCurrencyExchangeRate, userCurrency),
refunds: formatMoney(refundTotal * userCurrencyExchangeRate, userCurrency),
total: formatMoney(
(subtotal + shippingCost + taxes - discounts) * userCurrencyExchangeRate,
userCurrency
),
adjustedTotal: formatMoney(
(amount - refundTotal) * userCurrencyExchangeRate,
userCurrency
)
},
combinedItems,
orderDate: formatDateForEmail(order.createdAt),
orderUrl,
shipping: {
address: shippingAddressForEmail,
},
shopName: shop.name,
socialLinks: {
display: false
},
order: {
...order,
shipping: adjustedOrderGroups
},
billing: {
address: billingAddressForEmail,
payments: (order.payments || []).map((payment) => ({
displayName: payment.displayName,
displayAmount: formatMoney(payment.amount * userCurrencyExchangeRate, userCurrency)
})),
subtotal: formatMoney(subtotal * userCurrencyExchangeRate, userCurrency),
shipping: formatMoney(shippingCost * userCurrencyExchangeRate, userCurrency),
taxes: formatMoney(taxes * userCurrencyExchangeRate, userCurrency),
discounts: formatMoney(discounts * userCurrencyExchangeRate, userCurrency),
refunds: formatMoney(refundTotal * userCurrencyExchangeRate, userCurrency),
total: formatMoney(
(subtotal + shippingCost + taxes - discounts) * userCurrencyExchangeRate,
userCurrency
),
adjustedTotal: formatMoney(
(amount - refundTotal) * userCurrencyExchangeRate,
userCurrency
)
},
combinedItems,
orderDate: formatDateForEmail(order.createdAt),
orderUrl,
displayAmount: (node) => formatMoney(node.amount, node.currencyCode)
};
payments: (order.payments || []).map((payment) => ({
displayName: payment.displayName,
displayAmount: formatMoney(payment.amount * userCurrencyExchangeRate, userCurrency)
})),
subtotal: formatMoney(subtotal * userCurrencyExchangeRate, userCurrency),
shopName: shop.name,
socialLinks: {
display: false
},
order: {
...order,
shipping: adjustedOrderGroups
},
billing: {
address: billingAddressForEmail,
payments: (order.payments || []).map((payment) => ({
displayName: payment.displayName,
displayAmount: formatMoney(payment.amount * userCurrencyExchangeRate, userCurrency)
})),
subtotal: formatMoney(subtotal * userCurrencyExchangeRate, userCurrency),
shipping: formatMoney(shippingCost * userCurrencyExchangeRate, userCurrency),
taxes: formatMoney(taxes * userCurrencyExchangeRate, userCurrency),
discounts: formatMoney(discounts * userCurrencyExchangeRate, userCurrency),
refunds: formatMoney(refundTotal * userCurrencyExchangeRate, userCurrency),
total: formatMoney(
(subtotal + shippingCost + taxes - discounts) * userCurrencyExchangeRate,
userCurrency
),
adjustedTotal: formatMoney(
(amount - refundTotal) * userCurrencyExchangeRate,
userCurrency
)
},
combinedItems,
orderDate: formatDateForEmail(order.createdAt),
orderUrl,
shipping: {
billing: {
address: billingAddressForEmail,
payments: (order.payments || []).map((payment) => ({
displayName: payment.displayName,
displayAmount: formatMoney(payment.amount * userCurrencyExchangeRate, userCurrency)
})),
subtotal: formatMoney(subtotal * userCurrencyExchangeRate, userCurrency),
shipping: formatMoney(shippingCost * userCurrencyExchangeRate, userCurrency),
taxes: formatMoney(taxes * userCurrencyExchangeRate, userCurrency),
discounts: formatMoney(discounts * userCurrencyExchangeRate, userCurrency),
refunds: formatMoney(refundTotal * userCurrencyExchangeRate, userCurrency),
total: formatMoney(
(subtotal + shippingCost + taxes - discounts) * userCurrencyExchangeRate,
userCurrency
),
adjustedTotal: formatMoney(
(amount - refundTotal) * userCurrencyExchangeRate,
userCurrency
)
},
combinedItems,
orderDate: formatDateForEmail(order.createdAt),
orderUrl,
shipping: {
address: shippingAddressForEmail,
carrier,
tracking
}
};
}
order: {
...order,
shipping: adjustedOrderGroups
},
billing: {
address: billingAddressForEmail,
payments: (order.payments || []).map((payment) => ({
displayName: payment.displayName,
displayAmount: formatMoney(payment.amount * userCurrencyExchangeRate, userCurrency)
})),
subtotal: formatMoney(subtotal * userCurrencyExchangeRate, userCurrency),
shipping: formatMoney(shippingCost * userCurrencyExchangeRate, userCurrency),
taxes: formatMoney(taxes * userCurrencyExchangeRate, userCurrency),
discounts: formatMoney(discounts * userCurrencyExchangeRate, userCurrency),
refunds: formatMoney(refundTotal * userCurrencyExchangeRate, userCurrency),
total: formatMoney(
(subtotal + shippingCost + taxes - discounts) * userCurrencyExchangeRate,
userCurrency
),
adjustedTotal: formatMoney(
(amount - refundTotal) * userCurrencyExchangeRate,
userCurrency
)
},
combinedItems,
orderDate: formatDateForEmail(order.createdAt),
orderUrl,
shipping: {
address: shippingAddressForEmail,
carrier,
tracking
}
display: false
},
order: {
...order,
shipping: adjustedOrderGroups
},
billing: {
address: billingAddressForEmail,
payments: (order.payments || []).map((payment) => ({
displayName: payment.displayName,
displayAmount: formatMoney(payment.amount * userCurrencyExchangeRate, userCurrency)
})),
subtotal: formatMoney(subtotal * userCurrencyExchangeRate, userCurrency),
shipping: formatMoney(shippingCost * userCurrencyExchangeRate, userCurrency),
taxes: formatMoney(taxes * userCurrencyExchangeRate, userCurrency),
discounts: formatMoney(discounts * userCurrencyExchangeRate, userCurrency),
refunds: formatMoney(refundTotal * userCurrencyExchangeRate, userCurrency),
total: formatMoney(
(subtotal + shippingCost + taxes - discounts) * userCurrencyExchangeRate,
userCurrency
),
adjustedTotal: formatMoney(
(amount - refundTotal) * userCurrencyExchangeRate,
userCurrency
)
},
combinedItems,
orderDate: formatDateForEmail(order.createdAt),
orderUrl,
shipping: {
address: shippingAddressForEmail,
carrier,