diff --git a/lib/Util.js b/lib/Util.js index ea0c403..0924a3f 100644 --- a/lib/Util.js +++ b/lib/Util.js @@ -479,7 +479,11 @@ var Util = /** @class */ (function (_super) { validations = _a.sent(); //console.log(`validations: ${JSON.stringify(validations,null,2)}`) // Extract the boolean result - validations = validations.map(function (x) { return x.valid; }); + validations = validations.map(function (x) { + if (x !== null) + return x.valid; + return false; + }); _loop_1 = function (i) { var thisUtxo, thisValidation, slpData, voutMatch; return __generator(this, function (_a) { diff --git a/src/Util.ts b/src/Util.ts index 85ae644..ef38a14 100644 --- a/src/Util.ts +++ b/src/Util.ts @@ -365,7 +365,12 @@ class Util extends BITBOXUtil { //console.log(`validations: ${JSON.stringify(validations,null,2)}`) // Extract the boolean result - validations = validations.map((x: any) => x.valid) + validations = validations.map((x: any) => { + if (x !== null) + return x.valid; + + return false; + }) // Loop through each element and compute final validation on any that // returned true.