@faststore/api 2.1.78 → 2.1.83

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@faststore/api",
3
- "version": "2.1.78",
3
+ "version": "2.1.83",
4
4
  "license": "MIT",
5
5
  "main": "dist/index.js",
6
6
  "typings": "dist/index.d.ts",
@@ -36,8 +36,8 @@
36
36
  },
37
37
  "devDependencies": {
38
38
  "@envelop/core": "^2.6.0",
39
- "@faststore/eslint-config": "^2.1.78",
40
- "@faststore/shared": "^2.1.78",
39
+ "@faststore/eslint-config": "^2.1.82",
40
+ "@faststore/shared": "^2.1.82",
41
41
  "@graphql-codegen/cli": "2.2.0",
42
42
  "@graphql-codegen/typescript": "2.2.2",
43
43
  "@types/express": "^4.17.16",
@@ -56,5 +56,5 @@
56
56
  "@envelop/core": "^1 || ^2",
57
57
  "graphql": "^15.6.0"
58
58
  },
59
- "gitHead": "847d5c45e0b3929558d0acd39359f47d783f2cf3"
59
+ "gitHead": "a55301974a0ab1894b32414d372091d956fbc17b"
60
60
  }
@@ -128,7 +128,9 @@ const joinItems = (form: OrderForm) => {
128
128
  const [item] = items
129
129
  const quantity = items.reduce((acc, i) => acc + i.quantity, 0)
130
130
  const totalPrice = items.reduce(
131
- (acc, i) => acc + i.quantity * i.sellingPrice,
131
+ (acc, i) =>
132
+ acc +
133
+ (i?.priceDefinition?.total ?? (i?.quantity ?? 0) * (i?.sellingPrice ?? 0)),
132
134
  0
133
135
  )
134
136