From 0a240d5559ec130eaa4aab0e2209eff1192636b6 Mon Sep 17 00:00:00 2001 From: Matias Alejo Garcia Date: Tue, 7 Jun 2016 12:03:00 -0300 Subject: [PATCH] fix BWS url --- angular-bitcore-wallet-client/index.js | 4 ++-- src/js/services/profileService.js | 4 ++-- test/helpers.js | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/angular-bitcore-wallet-client/index.js b/angular-bitcore-wallet-client/index.js index 0e80686f9..a7d0c09d6 100644 --- a/angular-bitcore-wallet-client/index.js +++ b/angular-bitcore-wallet-client/index.js @@ -32,9 +32,9 @@ bwcModule.provider("bwcService", function() { service.getClient = function(walletData, opts) { opts = opts || {}; - //note opts use `baseurl` all lowercase; + //note opts use `bwsurl` all lowercase; var bwc = new Client({ - baseUrl: opts.baseurl || 'https://bws.bitpay.com/bws/api', + baseUrl: opts.bwsurl || 'https://bws.bitpay.com/bws/api', verbose: opts.verbose, transports: ['polling'], }); diff --git a/src/js/services/profileService.js b/src/js/services/profileService.js index 03cba8311..dde981f2f 100644 --- a/src/js/services/profileService.js +++ b/src/js/services/profileService.js @@ -130,7 +130,7 @@ angular.module('copayApp.services') $log.debug('Bind wallet:' + credentials.walletId); // Create the client - var getBaseURL = function(walletId) { + var getBWSURL = function(walletId) { var config = configService.getSync(); var defaults = configService.getDefaults(); return ((config.bwsFor && config.bwsFor[walletId]) || defaults.bws.url); @@ -138,7 +138,7 @@ angular.module('copayApp.services') var skipKeyValidation = root.profile.isChecked(platformInfo.ua, credentials.walletId); var client = bwcService.getClient(JSON.stringify(credentials), { - baseurl: getBaseURL(credentials.walletId), + bwsurl: getBWSURL(credentials.walletId), skipKeyValidation: skipKeyValidation, }); diff --git a/test/helpers.js b/test/helpers.js index 01cc65ff5..59520af00 100644 --- a/test/helpers.js +++ b/test/helpers.js @@ -98,7 +98,7 @@ mocks.init = function(fixtures, controllerName, opts, done) { var bwc = new $delegate.Client(); if (walletData) bwc.import(walletData, { - baseUrl: opts.baseurl || 'https://bws.bitpay.com/bws/api', + baseUrl: opts.bwsurl || 'https://bws.bitpay.com/bws/api', verbose: opts.verbose, transports: ['polling'], });