graycoreio/daffodil

View on GitHub
libs/cart/driver/magento/src/transforms/outputs/cart-totals-transformer.ts

Summary

Maintainability
A
2 hrs
Test Coverage

Function transformCartTotals has 55 lines of code (exceeds 25 allowed). Consider refactoring.
Open

export function transformCartTotals(cart: Partial<MagentoCart>): {totals: DaffCart['totals']} {
  const totalTax = cart.prices.applied_taxes ? cart.prices.applied_taxes.reduce((acc, tax) => (daffAdd(acc, tax.amount.value)), 0) : 0;
  return {
    totals: {
      [DaffCartTotalTypeEnum.grandTotal]: {

    There are no issues that match your filters.

    Category
    Status