Fixed ECKey constructor

This commit is contained in:
Vitalik Buterin 2014-01-22 08:46:46 -05:00
parent 36ce412bcb
commit c8732e5d38
2 changed files with 4 additions and 4 deletions

6
bitcoinjs-min.js vendored

File diff suppressed because one or more lines are too long

View file

@ -12,7 +12,7 @@ var ecparams = sec("secp256k1");
// input can be nothing, array of bytes, hex string, or base58 string // input can be nothing, array of bytes, hex string, or base58 string
var ECKey = function (input,compressed) { var ECKey = function (input,compressed) {
if (!(this instanceof ECKey)) { return new ECKey(input); } if (!(this instanceof ECKey)) { return new ECKey(input,compressed); }
if (!input) { if (!input) {
// Generate new key // Generate new key
var n = ecparams.getN(); var n = ecparams.getN();