fix m, n, publicKeys in wallet constructor.
This commit is contained in:
parent
1e10b83acf
commit
377e156874
@ -58,13 +58,13 @@ function Wallet(options, passphrase) {
|
||||
this.fee = 10000;
|
||||
this.dust = 5460;
|
||||
|
||||
if (options.m != null) {
|
||||
this.m = options.m;
|
||||
this.n = options.n;
|
||||
this.publicKeys = options.publicKeys || [];
|
||||
this.m = options.m || 1;
|
||||
this.n = options.n || 1;
|
||||
this.publicKeys = options.publicKeys;
|
||||
|
||||
if (this.n < this.publicKeys.length) {
|
||||
this.publicKeys.push(this.getPublicKey('base58'));
|
||||
if (this.publicKeys) {
|
||||
if (this.publicKeys.length < this.n) {
|
||||
this.publicKeys.push(this.getPublicKey());
|
||||
}
|
||||
|
||||
if (this.m < 1 || this.m > this.n) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user