trying to fix tests

This commit is contained in:
Matias Alejo Garcia 2014-09-15 16:11:26 -03:00
commit 52a8423df9
2 changed files with 23 additions and 16 deletions

View file

@ -37,7 +37,8 @@ var Storage = module.exports.Storage = require('../Storage');
function WalletFactory(config, version, pluginManager) {
var self = this;
config = config || {};
preconditions.checkArgument(config);
preconditions.checkArgument(config.network);
this.Storage = config.Storage || Storage;
this.Network = config.Network || Async;
@ -62,7 +63,7 @@ function WalletFactory(config, version, pluginManager) {
'testnet': new this.Blockchain(config.network.testnet),
};
this.walletDefaults = config.walle || {};
this.walletDefaults = config.wallet || {};
this.version = version;
};
@ -94,9 +95,6 @@ WalletFactory.prototype.fromObj = function(obj, skipFields) {
obj.opts = obj.opts || {};
obj.opts.reconnectDelay = this.walletDefaults.reconnectDelay;
// this is only used if private key or public key ring is skipped
obj.opts.networkName = networkName;
skipFields = skipFields || [];
skipFields.forEach(function(k) {
if (obj[k]) {