Skip to content

Commit

Permalink
docode function has no enc as a parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
alphons authored May 30, 2022
1 parent eda7a6e commit 8e5e043
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ref/javascript/segwit_addr.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ function encode (hrp, version, program) {
enc = bech32.encodings.BECH32M;
}
var ret = bech32.encode(hrp, [version].concat(convertbits(program, 8, 5, true)), enc);
if (decode(hrp, ret, enc) === null) {
if (decode(hrp, ret) === null) {
return null;
}
return ret;
Expand Down

0 comments on commit 8e5e043

Please sign in to comment.