Merge pull request #134 from Bitcoin-com/wallet/task/348

Bug - 348 - Tapping ↻ on the "Wallet Service URL" screen will change it to a wrong URL.
This commit is contained in:
Jean-Baptiste Dominguez 2018-05-23 12:49:57 +09:00 committed by GitHub
commit 4319bfa82a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -16,7 +16,7 @@ angular.module('copayApp.controllers').controller('preferencesBwsUrlController',
}; };
$scope.resetDefaultUrl = function() { $scope.resetDefaultUrl = function() {
$scope.bwsurl.value = defaults.bws.url; $scope.bwsurl.value = ($scope.wallet.coin === 'btc') ? defaults.bws.url : defaults.bwscash.url;
}; };
$scope.save = function() { $scope.save = function() {
@ -25,15 +25,15 @@ angular.module('copayApp.controllers').controller('preferencesBwsUrlController',
switch ($scope.bwsurl.value) { switch ($scope.bwsurl.value) {
case 'prod': case 'prod':
case 'production': case 'production':
bws = 'https://bws.bitcoin.com/bws/api' bws = ($scope.wallet.coin === 'btc') ? defaults.bws.url : defaults.bwscash.url;
break; break;
case 'sta': case 'sta':
case 'staging': case 'staging':
bws = 'https://bws-staging.b-pay.net/bws/api' bws = 'https://bws-staging.b-pay.net/bws/api';
break; break;
case 'loc': case 'loc':
case 'local': case 'local':
bws = 'http://localhost:3232/bws/api' bws = 'http://localhost:3232/bws/api';
break; break;
}; };
if (bws) { if (bws) {