fix BWS url

This commit is contained in:
Matias Alejo Garcia 2016-06-07 12:03:00 -03:00
parent c8002feb2c
commit 0a240d5559
No known key found for this signature in database
GPG Key ID: 02470DB551277AB3
3 changed files with 5 additions and 5 deletions

View File

@ -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'],
});

View File

@ -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,
});

View File

@ -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'],
});