Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix isTokenUtxo to non SLP transactions #85

Merged
merged 2 commits into from
Jan 14, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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