@helios-lang/contract-utils 0.2.27 → 0.2.28
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
|
@@ -263,15 +263,12 @@ class ContractContextCache {
|
|
|
263
263
|
*/
|
|
264
264
|
let datum = None
|
|
265
265
|
|
|
266
|
-
if (hash instanceof
|
|
267
|
-
datum =
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
if (!datum) {
|
|
273
|
-
throw new Error("Datum is not a Cast type")
|
|
274
|
-
}
|
|
266
|
+
if (hash.context.datum && hash.context.datum instanceof Cast) {
|
|
267
|
+
datum = hash.context.datum
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
if (["spending", "mixed"].includes(purpose) && !datum) {
|
|
271
|
+
throw new Error("Datum is not a Cast type")
|
|
275
272
|
}
|
|
276
273
|
|
|
277
274
|
resValidators[name] = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContractContextCache.d.ts","sourceRoot":"","sources":["../../src/context/ContractContextCache.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ContractContextCache.d.ts","sourceRoot":"","sources":["../../src/context/ContractContextCache.js"],"names":[],"mappings":"AAwTA,wDAA8D;4BA3SjD,OAAO,mBAAmB,EAAE,aAAa;0BACzC,OAAO,mBAAmB,EAAE,WAAW;yBACvC,OAAO,kBAAkB,EAAE,UAAU;yBACrC,OAAO,qBAAqB,EAAE,UAAU;0CACxC,OAAO,sBAAsB,EAAE,2BAA2B;;;;;;;;;;;iBAYvD,SAAS,GAAG,UAAU,GAAG,SAAS,GAAG,OAAO;eAC9C,MAAM,EAAE;;0BAEG,MAAM;uBACT,aAAa;oBAChB,UAAU;;kBAEZ,UAAU;;;;;;0BAOJ,MAAM;uBACT,aAAa;;;6BAKpB;IACZ,UAAc,EAAE,wBAAwB,CAAA;IACxC,SAAa,EAAE,uBAAuB,CAAA;CACnC;AAxCJ;;;;;;GAMG;AAEH;;;;;GAKG;AAEH;;;;;;;;;;;GAWG;AAEH;;;;;;GAMG;AAEH;;;;;GAKG;AAEH;IACI;;OAEG;IACH,OAFU,UAAU,EAAE,CAEjB;IAEL;;;OAGG;IACH,GAFU,MAAM,CAEf;IAED;;OAEG;IACH,SAFU,OAAO,CAEV;IAQP,eAEC;IAED;;OAEG;IACH,WAFW,cAAc,EAAE,QA8G1B;IAED;;OAEG;IACH,aAFW,UAAU,QAMpB;IAED;;OAEG;IACH,SAFa,OAAO,UAAU,CAAC,CAY9B;IAED;;OAEG;IACH,UAFY,cAAc,EAAE,CAyF3B;CACJ"}
|