diff --git a/config.js b/config.js index 9c0ef9224..d84a3af9e 100644 --- a/config.js +++ b/config.js @@ -6,11 +6,6 @@ var defaultConfig = { forceNetwork: false, logLevel: 'info', - // DEFAULT unit: Bit - unitName: 'bits', - unitToSatoshi: 100, - alternativeName: 'US Dollar', - alternativeIsoCode: 'USD', // wallet limits limits: { @@ -30,10 +25,14 @@ var defaultConfig = { requiredCopayers: 2, totalCopayers: 3, spendUnconfirmed: true, - verbose: 1, - // will duplicate itself after each try reconnectDelay: 5000, - idleDurationMin: 4 + idleDurationMin: 4, + settings: { + unitName: 'bits', + unitToSatoshi: 100, + alternativeName: 'US Dollar', + alternativeIsoCode: 'USD', + } }, // blockchain service API config @@ -62,7 +61,6 @@ var defaultConfig = { updateFrequencySeconds: 60 * 60 }, - verbose: 1, }; if (typeof module !== 'undefined') - module.exports = defaultConfig; \ No newline at end of file + module.exports = defaultConfig; diff --git a/js/models/core/Settings.js b/js/models/core/Settings.js index 4d8cbc0de..8ec86fe53 100644 --- a/js/models/core/Settings.js +++ b/js/models/core/Settings.js @@ -9,4 +9,10 @@ function Settings(opts) { var self = this; } +Settings.prototype.toObj = function() { + return { + + } +}; + module.exports = Settings; diff --git a/js/models/core/Wallet.js b/js/models/core/Wallet.js index daa985438..66dd1fa13 100644 --- a/js/models/core/Wallet.js +++ b/js/models/core/Wallet.js @@ -799,6 +799,7 @@ Wallet.prototype.toObj = function() { var walletObj = { opts: optsObj, + settings: this.settings.toObj(); networkNonce: networkNonce, //yours networkNonces: networkNonces, //copayers publicKeyRing: this.publicKeyRing.toObj(), @@ -832,6 +833,7 @@ Wallet.fromObj = function(o, storage, network, blockchain) { var opts = JSON.parse(JSON.stringify(o.opts)); opts.addressBook = o.addressBook; + opts.settings = o.settings; if (o.privateKey) { opts.privateKey = PrivateKey.fromObj(o.privateKey); @@ -2523,4 +2525,4 @@ Wallet.request = function(options, callback) { return ret; }; -module.exports = Wallet; \ No newline at end of file +module.exports = Wallet; diff --git a/js/models/core/WalletFactory.js b/js/models/core/WalletFactory.js index 2df26a931..bde1f27e1 100644 --- a/js/models/core/WalletFactory.js +++ b/js/models/core/WalletFactory.js @@ -95,7 +95,6 @@ WalletFactory.prototype.fromObj = function(obj, skipFields) { var w = Wallet.fromObj(obj, this.storage, this.network, this.blockchain); if (!w) return false; - w.verbose = this.verbose; this._checkVersion(w.version); this._checkNetwork(w.getNetworkName()); return w; @@ -217,7 +216,6 @@ WalletFactory.prototype.create = function(opts) { opts.storage = this.storage; opts.network = this.network; opts.blockchain = this.blockchain; - opts.verbose = this.verbose; opts.spendUnconfirmed = opts.spendUnconfirmed || this.walletDefaults.spendUnconfirmed; opts.reconnectDelay = opts.reconnectDelay || this.walletDefaults.reconnectDelay; diff --git a/test/test.PayPro.js b/test/test.PayPro.js index fbbeaf7ef..77872c23e 100644 --- a/test/test.PayPro.js +++ b/test/test.PayPro.js @@ -86,7 +86,6 @@ describe('PayPro (in Wallet) model', function() { }; c.networkName = walletConfig.networkName; - c.verbose = walletConfig.verbose; c.version = '0.0.1'; return new Wallet(c); diff --git a/test/test.Wallet.js b/test/test.Wallet.js index d6b765b46..e32698b3e 100644 --- a/test/test.Wallet.js +++ b/test/test.Wallet.js @@ -102,7 +102,6 @@ describe('Wallet model', function() { }; c.networkName = walletConfig.networkName; - c.verbose = walletConfig.verbose; c.version = '0.0.1'; @@ -1533,4 +1532,4 @@ describe('Wallet model', function() { should.exist(n.networkNonce); }); -}); \ No newline at end of file +}); diff --git a/test/test.WalletFactory.js b/test/test.WalletFactory.js index b79bdcd5c..d6cd93ac0 100644 --- a/test/test.WalletFactory.js +++ b/test/test.WalletFactory.js @@ -290,7 +290,6 @@ describe('WalletFactory model', function() { "totalCopayers": 3, "reconnectDelay": 100, "spendUnconfirmed": 1, - "verbose": 0 }, "blockchain": { "host": "test.insight.is", @@ -300,7 +299,6 @@ describe('WalletFactory model', function() { "host": "test.insight.is", "port": 3001 }, - "verbose": 0, "themes": ["default"], }; var wf = new WalletFactory(sconfig, '0.0.1');