mirror of https://github.com/BTCPrivate/copay.git
fix BWS url
This commit is contained in:
parent
c8002feb2c
commit
0a240d5559
|
@ -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'],
|
||||
});
|
||||
|
|
|
@ -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,
|
||||
});
|
||||
|
||||
|
|
|
@ -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'],
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue