Skip to content

Commit

Permalink
Fix null witness case.
Browse files Browse the repository at this point in the history
  • Loading branch information
ARyaskov committed Jan 14, 2019
1 parent bd7a094 commit 6815d3f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/script/witness.js
Original file line number Diff line number Diff line change
Expand Up @@ -431,7 +431,11 @@ class Witness extends Stack {
*/

toJSON() {
return this.toRaw().toString('hex');
let result = this.toRaw().toString('hex');
if (result === '00') {
result = null;
}
return result;
}

/**
Expand Down

0 comments on commit 6815d3f

Please sign in to comment.