diff --git a/lib/utils/bech32.js b/lib/utils/bech32.js index fefc2ffe..6aa2a705 100644 --- a/lib/utils/bech32.js +++ b/lib/utils/bech32.js @@ -273,7 +273,7 @@ function encode(hrp, version, hash) { return serialize(hrp, data); } -if (native && native.toBech32) +if (native) encode = native.toBech32; /** @@ -304,7 +304,7 @@ function decode(str) { return new AddrResult(hrp, version, hash); } -if (native && native.fromBech32) +if (native) decode = native.fromBech32; /**