diff --git a/config.js b/config.js index d84a3af9e..f9ca1170d 100644 --- a/config.js +++ b/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 passphrase: { iterations: 100, diff --git a/js/controllers/settings.js b/js/controllers/settings.js index b8b5ed1a8..620a06e36 100644 --- a/js/controllers/settings.js +++ b/js/controllers/settings.js @@ -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 })); diff --git a/js/models/core/Wallet.js b/js/models/core/Wallet.js index 0e1f63737..4f603da24 100644 --- a/js/models/core/Wallet.js +++ b/js/models/core/Wallet.js @@ -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 senderId. @@ -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); }); diff --git a/js/models/core/WalletFactory.js b/js/models/core/WalletFactory.js index bde1f27e1..9f052e8f6 100644 --- a/js/models/core/WalletFactory.js +++ b/js/models/core/WalletFactory.js @@ -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;