diff --git a/app-template/config-template.xml b/app-template/config-template.xml index 1db63c59a..98c36cf65 100644 --- a/app-template/config-template.xml +++ b/app-template/config-template.xml @@ -56,8 +56,9 @@ - - + + + diff --git a/src/js/controllers/bitpayCardIntro.js b/src/js/controllers/bitpayCardIntro.js index fe87e4c4e..4fc4589be 100644 --- a/src/js/controllers/bitpayCardIntro.js +++ b/src/js/controllers/bitpayCardIntro.js @@ -50,7 +50,7 @@ angular.module('copayApp.controllers').controller('bitpayCardIntroController', f } else { // TEST TODO bitpayCardService.testSession(function(err, session) { - if (err) $log.error(err); + if (err) popupService.showAlert(null, err); }); } diff --git a/src/js/services/bitpayCardService.js b/src/js/services/bitpayCardService.js index 3b4c1f7f8..bd29fa3c6 100644 --- a/src/js/services/bitpayCardService.js +++ b/src/js/services/bitpayCardService.js @@ -44,7 +44,7 @@ angular.module('copayApp.services').factory('bitpayCardService', function($http, _setCredentials(); $http({ method: 'GET', - url: credentials.BITPAY_API_URL + '/visa-api/session', + url: credentials.BITPAY_API_URL + '/api/session', headers: { 'content-type': 'application/json' } @@ -154,12 +154,12 @@ angular.module('copayApp.services').factory('bitpayCardService', function($http, code: obj.otp }; - var dataToSign = credentials.BITPAY_API_URL + '/visa-api/validateBitAuthPairingCode' + JSON.stringify(userData); + var dataToSign = credentials.BITPAY_API_URL + '/api/validateBitAuthPairingCode' + JSON.stringify(userData); var signedData = bitauthService.sign(dataToSign, credentials.BITPAY_PRIV_KEY); $http({ method: 'POST', - url: credentials.BITPAY_API_URL + '/visa-api/validateBitAuthPairingCode', + url: credentials.BITPAY_API_URL + '/api/validateBitAuthPairingCode', headers: { 'content-type': 'application/json', 'x-csrf-token': session.csrfToken, diff --git a/src/js/services/incomingData.js b/src/js/services/incomingData.js index 53a3c483b..c48157052 100644 --- a/src/js/services/incomingData.js +++ b/src/js/services/incomingData.js @@ -1,9 +1,18 @@ 'use strict'; -angular.module('copayApp.services').factory('incomingData', function($log, $ionicModal, $state, $window, $timeout, bitcore) { +angular.module('copayApp.services').factory('incomingData', function($log, $ionicModal, $state, $window, $timeout, bitcore, lodash) { var root = {}; + var ignoreState = [ + 'tabs.language', + 'tabs.about.translators', + 'tabs.bitpayCardIntro', + 'tabs.buyandsell.glidera', + 'tabs.giftcards.amazon', + 'tabs.giftcards.amazon.buy' + ]; + root.redir = function(data) { $log.debug('Processing incoming data:' +data); @@ -70,7 +79,8 @@ angular.module('copayApp.services').factory('incomingData', function($log, $ioni // Plain URL } else if (/^https?:\/\//.test(data)) { - if ($state.current.name == 'tabs.bitpayCardIntro' || $state.current.name == 'tabs.buyandsell.glidera') return false; + var currentState = $state.current.name; + if (lodash.indexOf(ignoreState, currentState) != -1) return false; $state.go('tabs.send'); $timeout(function() { $state.transitionTo('tabs.send.confirm', {paypro: data}); diff --git a/www/views/bitpayCardIntro.html b/www/views/bitpayCardIntro.html index 7b42f3611..262a5f710 100644 --- a/www/views/bitpayCardIntro.html +++ b/www/views/bitpayCardIntro.html @@ -22,7 +22,7 @@

Get local cash anywhere you go, from any Visa®-compatible ATM. -

+
*ATM bank fees may apply