settings: nuke verbose 2
This commit is contained in:
parent
ecceb668e3
commit
f9a31ce9aa
7 changed files with 18 additions and 18 deletions
16
config.js
16
config.js
|
|
@ -6,11 +6,6 @@ var defaultConfig = {
|
||||||
forceNetwork: false,
|
forceNetwork: false,
|
||||||
logLevel: 'info',
|
logLevel: 'info',
|
||||||
|
|
||||||
// DEFAULT unit: Bit
|
|
||||||
unitName: 'bits',
|
|
||||||
unitToSatoshi: 100,
|
|
||||||
alternativeName: 'US Dollar',
|
|
||||||
alternativeIsoCode: 'USD',
|
|
||||||
|
|
||||||
// wallet limits
|
// wallet limits
|
||||||
limits: {
|
limits: {
|
||||||
|
|
@ -30,10 +25,14 @@ var defaultConfig = {
|
||||||
requiredCopayers: 2,
|
requiredCopayers: 2,
|
||||||
totalCopayers: 3,
|
totalCopayers: 3,
|
||||||
spendUnconfirmed: true,
|
spendUnconfirmed: true,
|
||||||
verbose: 1,
|
|
||||||
// will duplicate itself after each try
|
|
||||||
reconnectDelay: 5000,
|
reconnectDelay: 5000,
|
||||||
idleDurationMin: 4
|
idleDurationMin: 4,
|
||||||
|
settings: {
|
||||||
|
unitName: 'bits',
|
||||||
|
unitToSatoshi: 100,
|
||||||
|
alternativeName: 'US Dollar',
|
||||||
|
alternativeIsoCode: 'USD',
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
// blockchain service API config
|
// blockchain service API config
|
||||||
|
|
@ -62,7 +61,6 @@ var defaultConfig = {
|
||||||
updateFrequencySeconds: 60 * 60
|
updateFrequencySeconds: 60 * 60
|
||||||
},
|
},
|
||||||
|
|
||||||
verbose: 1,
|
|
||||||
};
|
};
|
||||||
if (typeof module !== 'undefined')
|
if (typeof module !== 'undefined')
|
||||||
module.exports = defaultConfig;
|
module.exports = defaultConfig;
|
||||||
|
|
@ -9,4 +9,10 @@ function Settings(opts) {
|
||||||
var self = this;
|
var self = this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Settings.prototype.toObj = function() {
|
||||||
|
return {
|
||||||
|
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
module.exports = Settings;
|
module.exports = Settings;
|
||||||
|
|
|
||||||
|
|
@ -799,6 +799,7 @@ Wallet.prototype.toObj = function() {
|
||||||
|
|
||||||
var walletObj = {
|
var walletObj = {
|
||||||
opts: optsObj,
|
opts: optsObj,
|
||||||
|
settings: this.settings.toObj();
|
||||||
networkNonce: networkNonce, //yours
|
networkNonce: networkNonce, //yours
|
||||||
networkNonces: networkNonces, //copayers
|
networkNonces: networkNonces, //copayers
|
||||||
publicKeyRing: this.publicKeyRing.toObj(),
|
publicKeyRing: this.publicKeyRing.toObj(),
|
||||||
|
|
@ -832,6 +833,7 @@ Wallet.fromObj = function(o, storage, network, blockchain) {
|
||||||
var opts = JSON.parse(JSON.stringify(o.opts));
|
var opts = JSON.parse(JSON.stringify(o.opts));
|
||||||
|
|
||||||
opts.addressBook = o.addressBook;
|
opts.addressBook = o.addressBook;
|
||||||
|
opts.settings = o.settings;
|
||||||
|
|
||||||
if (o.privateKey) {
|
if (o.privateKey) {
|
||||||
opts.privateKey = PrivateKey.fromObj(o.privateKey);
|
opts.privateKey = PrivateKey.fromObj(o.privateKey);
|
||||||
|
|
|
||||||
|
|
@ -95,7 +95,6 @@ WalletFactory.prototype.fromObj = function(obj, skipFields) {
|
||||||
|
|
||||||
var w = Wallet.fromObj(obj, this.storage, this.network, this.blockchain);
|
var w = Wallet.fromObj(obj, this.storage, this.network, this.blockchain);
|
||||||
if (!w) return false;
|
if (!w) return false;
|
||||||
w.verbose = this.verbose;
|
|
||||||
this._checkVersion(w.version);
|
this._checkVersion(w.version);
|
||||||
this._checkNetwork(w.getNetworkName());
|
this._checkNetwork(w.getNetworkName());
|
||||||
return w;
|
return w;
|
||||||
|
|
@ -217,7 +216,6 @@ WalletFactory.prototype.create = function(opts) {
|
||||||
opts.storage = this.storage;
|
opts.storage = this.storage;
|
||||||
opts.network = this.network;
|
opts.network = this.network;
|
||||||
opts.blockchain = this.blockchain;
|
opts.blockchain = this.blockchain;
|
||||||
opts.verbose = this.verbose;
|
|
||||||
|
|
||||||
opts.spendUnconfirmed = opts.spendUnconfirmed || this.walletDefaults.spendUnconfirmed;
|
opts.spendUnconfirmed = opts.spendUnconfirmed || this.walletDefaults.spendUnconfirmed;
|
||||||
opts.reconnectDelay = opts.reconnectDelay || this.walletDefaults.reconnectDelay;
|
opts.reconnectDelay = opts.reconnectDelay || this.walletDefaults.reconnectDelay;
|
||||||
|
|
|
||||||
|
|
@ -86,7 +86,6 @@ describe('PayPro (in Wallet) model', function() {
|
||||||
};
|
};
|
||||||
|
|
||||||
c.networkName = walletConfig.networkName;
|
c.networkName = walletConfig.networkName;
|
||||||
c.verbose = walletConfig.verbose;
|
|
||||||
c.version = '0.0.1';
|
c.version = '0.0.1';
|
||||||
|
|
||||||
return new Wallet(c);
|
return new Wallet(c);
|
||||||
|
|
|
||||||
|
|
@ -102,7 +102,6 @@ describe('Wallet model', function() {
|
||||||
};
|
};
|
||||||
|
|
||||||
c.networkName = walletConfig.networkName;
|
c.networkName = walletConfig.networkName;
|
||||||
c.verbose = walletConfig.verbose;
|
|
||||||
c.version = '0.0.1';
|
c.version = '0.0.1';
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -290,7 +290,6 @@ describe('WalletFactory model', function() {
|
||||||
"totalCopayers": 3,
|
"totalCopayers": 3,
|
||||||
"reconnectDelay": 100,
|
"reconnectDelay": 100,
|
||||||
"spendUnconfirmed": 1,
|
"spendUnconfirmed": 1,
|
||||||
"verbose": 0
|
|
||||||
},
|
},
|
||||||
"blockchain": {
|
"blockchain": {
|
||||||
"host": "test.insight.is",
|
"host": "test.insight.is",
|
||||||
|
|
@ -300,7 +299,6 @@ describe('WalletFactory model', function() {
|
||||||
"host": "test.insight.is",
|
"host": "test.insight.is",
|
||||||
"port": 3001
|
"port": 3001
|
||||||
},
|
},
|
||||||
"verbose": 0,
|
|
||||||
"themes": ["default"],
|
"themes": ["default"],
|
||||||
};
|
};
|
||||||
var wf = new WalletFactory(sconfig, '0.0.1');
|
var wf = new WalletFactory(sconfig, '0.0.1');
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue