Skip to content

Commit

Permalink
fix: Pubkey(point) and Privkey(bn)
Browse files Browse the repository at this point in the history
  • Loading branch information
Ryan X. Charles committed Sep 2, 2014
1 parent caf6c87 commit 073ee0a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/privkey.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ var Random = require('./random');

var Privkey = function Privkey(bn) {
if (!(this instanceof Privkey))
return new Privkey(obj);
return new Privkey(bn);
if (bn instanceof BN)
this.bn = bn;
else if (bn) {
Expand Down
2 changes: 1 addition & 1 deletion lib/pubkey.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ var privkey = require('./privkey');

var Pubkey = function Pubkey(point) {
if (!(this instanceof Pubkey))
return new Pubkey(obj);
return new Pubkey(point);
if (point instanceof Point)
this.point = point;
else if (point) {
Expand Down

0 comments on commit 073ee0a

Please sign in to comment.