From 1d0800775489f1f9e2a588072a6eab6e484dc50c Mon Sep 17 00:00:00 2001 From: tripathyr Date: Wed, 21 Sep 2022 01:36:48 +0530 Subject: [PATCH] minor bug fix Added definition of curve when decompressing public key --- lib_btc.js | 1 + 1 file changed, 1 insertion(+) diff --git a/lib_btc.js b/lib_btc.js index c61c00c..3449269 100644 --- a/lib_btc.js +++ b/lib_btc.js @@ -2627,6 +2627,7 @@ coinjs.compressedToUncompressed = function (compressed) { var t1, t2; + var curve = EllipticCurve.getSECCurveByName("secp256k1"); t1 = curve.curve.decodePointHex(compressed); t2 = curve.curve.encodePointHex(t1); return t2;