Skip to content

Commit

Permalink
Merge pull request #85 from thr0wn/fix/isTokenUtxo
Browse files Browse the repository at this point in the history
Fix isTokenUtxo to non SLP transactions
  • Loading branch information
christroutner authored Jan 14, 2020
2 parents 594b419 + ded0183 commit 5b72a65
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
6 changes: 5 additions & 1 deletion lib/Util.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
7 changes: 6 additions & 1 deletion src/Util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 5b72a65

Please sign in to comment.