@koralabs/kora-labs-common 6.18.2 → 6.18.4

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.
@@ -80,7 +80,9 @@ const getImageDataFromDatum = async (apiHost, datum, options) => {
80
80
  const image = (_b = (_a = decodedDatum === null || decodedDatum === void 0 ? void 0 : decodedDatum.constructor_0) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.image;
81
81
  let data = { image };
82
82
  const creatorDefaults = (_f = (_e = (_d = (_c = decodedDatum === null || decodedDatum === void 0 ? void 0 : decodedDatum.constructor_0) === null || _c === void 0 ? void 0 : _c[2]) === null || _d === void 0 ? void 0 : _d.constructor_0) === null || _e === void 0 ? void 0 : _e[0]) !== null && _f !== void 0 ? _f : (_g = decodedDatum.constructor_0) === null || _g === void 0 ? void 0 : _g[2];
83
- if (creatorDefaults) {
83
+ // CIP-68 `extra` is arbitrary PlutusData; only a map is creator defaults (a bytestring like
84
+ // "@THERAF" is not, and used to throw in normalizeCreatorDefaultTextFields).
85
+ if (creatorDefaults && typeof creatorDefaults === 'object' && !Array.isArray(creatorDefaults)) {
84
86
  (0, exports.normalizeCreatorDefaultTextFields)(creatorDefaults);
85
87
  data = { image, creatorDefaults, metadata: (_h = decodedDatum === null || decodedDatum === void 0 ? void 0 : decodedDatum.constructor_0) === null || _h === void 0 ? void 0 : _h[0] };
86
88
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@koralabs/kora-labs-common",
3
- "version": "6.18.2",
3
+ "version": "6.18.4",
4
4
  "description": "Kora Labs Common Utilities",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",
@@ -69,7 +69,7 @@
69
69
  "pluralize-esm": "^9.0.5"
70
70
  },
71
71
  "overrides": {
72
- "js-yaml": "4.3.1",
72
+ "js-yaml": "4.3.2",
73
73
  "brace-expansion": "5.0.9"
74
74
  },
75
75
  "peerDependencies": {