Browse Source

ECPair: use 1 line for throw

hk-custom-address
Daniel Cousens 10 years ago
parent
commit
d3579289bd
  1. 4
      src/ecpair.js

4
src/ecpair.js

@ -91,9 +91,7 @@ ECPair.fromWIF = function (string, networks) {
network = networks || NETWORKS.bitcoin
}
if (network.wif !== version) {
throw new Error('Invalid network')
}
if (network.wif !== version) throw new Error('Invalid network')
var d = BigInteger.fromBuffer(payload)

Loading…
Cancel
Save