simplify wallet object
This commit is contained in:
parent
37698a9292
commit
441401987a
|
@ -3,8 +3,6 @@
|
|||
var _ = require('lodash');
|
||||
|
||||
var Copayer = require('./copayer');
|
||||
var Bitcore = require('bitcore');
|
||||
var PublicKey = Bitcore.PublicKey;
|
||||
var WALLET_VERSION = '1.0.0';
|
||||
|
||||
function Wallet(opts) {
|
||||
|
@ -20,9 +18,7 @@ function Wallet(opts) {
|
|||
this.addressIndex = 0;
|
||||
this.copayers = [];
|
||||
this.version = WALLET_VERSION;
|
||||
|
||||
if (opts.pubKey)
|
||||
this.pubKey = new PublicKey(opts.pubKey);
|
||||
this.pubKey = opts.pubKey;
|
||||
};
|
||||
|
||||
|
||||
|
@ -49,8 +45,7 @@ Wallet.fromObj = function (obj) {
|
|||
x.copayers = _.map(obj.copayers, function (copayer) {
|
||||
return new Copayer(copayer);
|
||||
});
|
||||
x.pubKey = new PublicKey(obj.pubKey);
|
||||
|
||||
x.pubKey = obj.pubKey;
|
||||
|
||||
return x;
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue