fix settings.js

This commit is contained in:
Manuel Araoz 2014-09-08 16:26:58 -07:00
commit c1d8103374
4 changed files with 18 additions and 18 deletions

View file

@ -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
passphrase: {
iterations: 100,

View file

@ -40,7 +40,7 @@ angular.module('copayApp.controllers').controller('SettingsController', function
localStorage.setItem('config', JSON.stringify({
network: insightSettings,
version: copay.version
version: copay.version,
defaultLanguage: $scope.selectedLanguage.isoCode
}));

View file

@ -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
* Handles a 'PUBLICKEYRING' message from <tt>senderId</tt>.
@ -893,7 +909,6 @@ Wallet.prototype.send = function(recipients, obj) {
Wallet.prototype.sendAllTxProposals = function(recipients, sinceTs) {
var ntxids = sinceTs ? this.txProposals.getNtxidsSince(sinceTs) : this.txProposals.getNtxids();
var self = this;
_.each(ntxids, function(ntxid, key) {
self.sendTxProposal(ntxid, recipients);
});

View file

@ -42,7 +42,7 @@ function WalletFactory(config, version) {
this.storage = new this.Storage(config.storage);
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.walletDefaults = config.wallet;