From 441401987a5561e9b913291d808c12582e3ce134 Mon Sep 17 00:00:00 2001 From: Matias Alejo Garcia Date: Mon, 2 Feb 2015 09:15:50 -0300 Subject: [PATCH] simplify wallet object --- lib/model/wallet.js | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/lib/model/wallet.js b/lib/model/wallet.js index d83cdc8..604da1a 100644 --- a/lib/model/wallet.js +++ b/lib/model/wallet.js @@ -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; };