epicmerch-mcp 1.3.0 → 1.3.1

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": "epicmerch-mcp",
3
- "version": "1.3.0",
3
+ "version": "1.3.1",
4
4
  "description": "MCP server for EpicMerch — integrates e-commerce into Claude and ChatGPT",
5
5
  "type": "module",
6
6
  "main": "src/index.js",
@@ -39,8 +39,7 @@ export default function Cart({ onCheckout }) {
39
39
 
40
40
  const remove = async (productId) => {
41
41
  await store.cart.remove(productId);
42
- // Optimistic local update — no need to re-fetch the whole cart.
43
- setCart(c => ({ ...c, items: (c.items || []).filter(i => i.productId !== productId) }));
42
+ store.cart.get().then(setCart);
44
43
  };
45
44
 
46
45
  const total = cart.items?.reduce((s, i) => s + i.price * i.qty, 0) ?? 0;
@@ -124,8 +124,8 @@ export default function Cart({ onCheckout }) {
124
124
 
125
125
  const remove = async (productId) => {
126
126
  await store.cart.remove(productId);
127
- // Optimistic local update — no need to re-fetch the whole cart from the
128
- // server. We already know which item was removed.
127
+ // Optimistic local update — the client already knows which item was
128
+ // removed; no need for a round-trip to re-fetch the whole cart.
129
129
  setCart(c => ({ ...c, items: (c.items || []).filter(i => i.productId !== productId) }));
130
130
  };
131
131