fix settings.js
This commit is contained in:
parent
c9cb2aae57
commit
c1d8103374
4 changed files with 18 additions and 18 deletions
15
config.js
15
config.js
|
|
@ -35,21 +35,6 @@ var defaultConfig = {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
// blockchain service API config
|
|
||||||
blockchain: {
|
|
||||||
schema: 'https',
|
|
||||||
host: 'test-insight.bitpay.com',
|
|
||||||
port: 443,
|
|
||||||
retryDelay: 1000,
|
|
||||||
},
|
|
||||||
// socket service API config
|
|
||||||
socket: {
|
|
||||||
schema: 'https',
|
|
||||||
host: 'test-insight.bitpay.com',
|
|
||||||
port: 443,
|
|
||||||
reconnectDelay: 1000,
|
|
||||||
},
|
|
||||||
|
|
||||||
// local encryption/security config
|
// local encryption/security config
|
||||||
passphrase: {
|
passphrase: {
|
||||||
iterations: 100,
|
iterations: 100,
|
||||||
|
|
|
||||||
|
|
@ -40,7 +40,7 @@ angular.module('copayApp.controllers').controller('SettingsController', function
|
||||||
|
|
||||||
localStorage.setItem('config', JSON.stringify({
|
localStorage.setItem('config', JSON.stringify({
|
||||||
network: insightSettings,
|
network: insightSettings,
|
||||||
version: copay.version
|
version: copay.version,
|
||||||
defaultLanguage: $scope.selectedLanguage.isoCode
|
defaultLanguage: $scope.selectedLanguage.isoCode
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -161,6 +161,22 @@ Wallet.prototype._onIndexes = function(senderId, data) {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @desc
|
||||||
|
* Changes wallet settings. The settings format is:
|
||||||
|
*
|
||||||
|
* var settings = {
|
||||||
|
* unitName: 'bits',
|
||||||
|
* unitToSatoshi: 100,
|
||||||
|
* alternativeName: 'US Dollar',
|
||||||
|
* alternativeIsoCode: 'USD',
|
||||||
|
* };
|
||||||
|
*/
|
||||||
|
Wallet.prototype.changeSettings = function(settings) {
|
||||||
|
console.log(settings);
|
||||||
|
this.settings = settings;
|
||||||
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @desc
|
* @desc
|
||||||
* Handles a 'PUBLICKEYRING' message from <tt>senderId</tt>.
|
* Handles a 'PUBLICKEYRING' message from <tt>senderId</tt>.
|
||||||
|
|
@ -893,7 +909,6 @@ Wallet.prototype.send = function(recipients, obj) {
|
||||||
Wallet.prototype.sendAllTxProposals = function(recipients, sinceTs) {
|
Wallet.prototype.sendAllTxProposals = function(recipients, sinceTs) {
|
||||||
var ntxids = sinceTs ? this.txProposals.getNtxidsSince(sinceTs) : this.txProposals.getNtxids();
|
var ntxids = sinceTs ? this.txProposals.getNtxidsSince(sinceTs) : this.txProposals.getNtxids();
|
||||||
var self = this;
|
var self = this;
|
||||||
|
|
||||||
_.each(ntxids, function(ntxid, key) {
|
_.each(ntxids, function(ntxid, key) {
|
||||||
self.sendTxProposal(ntxid, recipients);
|
self.sendTxProposal(ntxid, recipients);
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -42,7 +42,7 @@ function WalletFactory(config, version) {
|
||||||
|
|
||||||
this.storage = new this.Storage(config.storage);
|
this.storage = new this.Storage(config.storage);
|
||||||
this.network = new this.Network(config.network);
|
this.network = new this.Network(config.network);
|
||||||
this.blockchain = new this.Blockchain(config.blockchain);
|
this.blockchain = new this.Blockchain(config.network);
|
||||||
|
|
||||||
this.networkName = config.networkName;
|
this.networkName = config.networkName;
|
||||||
this.walletDefaults = config.wallet;
|
this.walletDefaults = config.wallet;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue