added a wrapper for the method fromObj of Wallet
This commit is contained in:
parent
1168bf82b8
commit
47cb4bd3da
3 changed files with 29 additions and 16 deletions
|
|
@ -52,15 +52,8 @@ WalletFactory.prototype._checkRead = function(walletId) {
|
|||
};
|
||||
|
||||
WalletFactory.prototype.fromObj = function(obj) {
|
||||
var opts = obj.opts;
|
||||
opts.publicKeyRing = new PublicKeyRing.fromObj(obj.publicKeyRing);
|
||||
opts.txProposals = new TxProposals.fromObj(obj.txProposals);
|
||||
opts.privateKey = new PrivateKey.fromObj(obj.privateKey);
|
||||
opts.storage = this.storage;
|
||||
opts.network = this.network;
|
||||
opts.blockchain = this.blockchain;
|
||||
opts.verbose = this.verbose;
|
||||
var w = new Wallet(opts);
|
||||
var w = Wallet.fromObj(obj, this.storage, this.network, this.blockchain);
|
||||
w.verbose = this.verbose;
|
||||
|
||||
// JIC: Add our key
|
||||
try {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue