ECPair: use 1 line for throw

This commit is contained in:
Daniel Cousens 2015-07-28 16:44:21 +10:00
parent 6443e4c2b6
commit d3579289bd

View file

@ -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)