From d6d8d9d9fd1f3d530e9bcc5aac6e3a5ed28c2f79 Mon Sep 17 00:00:00 2001 From: thr0wn Date: Fri, 10 Jan 2020 12:11:40 -0300 Subject: [PATCH 1/2] Fix isTokenUtxo to non SLP transactions --- src/Util.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/Util.ts b/src/Util.ts index b8254ab..6afa8df 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. From ded01839c28121ca8a7e18784360bf9dfbd2ad15 Mon Sep 17 00:00:00 2001 From: thr0wn Date: Fri, 10 Jan 2020 13:32:18 -0300 Subject: [PATCH 2/2] Fix isTokenUtxo - Update lib --- lib/Util.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/Util.js b/lib/Util.js index f8c386f..7f39271 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) {