@stackedapp/utils 1.17.9 → 1.17.11

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.
@@ -1170,7 +1170,11 @@ const meetsCompletionConditions = ({ completionConditions, completionTrackers, p
1170
1170
  }
1171
1171
  // Evaluate contractInteractions completion trackers
1172
1172
  if (conditions?.contractInteractions) {
1173
- for (const [conditionId, condition] of Object.entries(conditions.contractInteractions)) {
1173
+ const interactions = conditions.contractInteractions;
1174
+ const entries = Array.isArray(interactions)
1175
+ ? interactions.map((c) => [c.id || '', c])
1176
+ : Object.entries(interactions);
1177
+ for (const [conditionId, condition] of entries) {
1174
1178
  // Tracker now stores { amount: number, count: number }
1175
1179
  // Default to { amount: 0, count: 0 } if missing
1176
1180
  const rawTracker = completionTrackers?.contractInteractions?.[conditionId];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stackedapp/utils",
3
- "version": "1.17.9",
3
+ "version": "1.17.11",
4
4
  "description": "Public utilities for Stacked platform SDK",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",