Remove redundant check for uncompressed public key
This commit is contained in:
parent
ddedb574a3
commit
6067220cba
@ -107,7 +107,6 @@ HDNode.fromBase58 = function (string, networks) {
|
|||||||
// 33 bytes: public key data (0x02 + X or 0x03 + X)
|
// 33 bytes: public key data (0x02 + X or 0x03 + X)
|
||||||
} else {
|
} else {
|
||||||
var Q = ecurve.Point.decodeFrom(curve, buffer.slice(45, 78))
|
var Q = ecurve.Point.decodeFrom(curve, buffer.slice(45, 78))
|
||||||
if (!Q.compressed) throw new Error('Invalid public key')
|
|
||||||
|
|
||||||
// Verify that the X coordinate in the public point corresponds to a point on the curve.
|
// Verify that the X coordinate in the public point corresponds to a point on the curve.
|
||||||
// If not, the extended public key is invalid.
|
// If not, the extended public key is invalid.
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user