Disables BitPay Card from appConfig

This commit is contained in:
Gustavo Maximiliano Cortez 2017-03-02 09:53:54 -03:00
parent 02f84b8a60
commit f13d9ca6a4
No known key found for this signature in database
GPG Key ID: 15EDAD8D9F2EB1AF
2 changed files with 7 additions and 1 deletions

View File

@ -1,6 +1,6 @@
'use strict';
angular.module('copayApp.services').factory('bitpayCardService', function($log, $rootScope, $filter, lodash, storageService, bitauthService, platformInfo, moment, appIdentityService, bitpayService, nextStepsService, configService, txFormatService) {
angular.module('copayApp.services').factory('bitpayCardService', function($log, $rootScope, $filter, lodash, storageService, bitauthService, platformInfo, moment, appIdentityService, bitpayService, nextStepsService, configService, txFormatService, appConfigService) {
var root = {};
var _setError = function(msg, e) {
@ -1323,6 +1323,8 @@ angular.module('copayApp.services').factory('bitpayCardService', function($log,
root.registerNextStep = function() {
// Disable BitPay Card
if (!appConfigService._enabledExtensions.debitcard) return;
root.getCards(function(err, cards) {
if (lodash.isEmpty(cards)) {
nextStepsService.register(nextStepItem);

View File

@ -165,6 +165,10 @@ angular.module('copayApp.services').factory('incomingData', function($log, $stat
// BitPayCard Authentication
} else if (data && data.indexOf(appConfigService.name + '://') === 0) {
// Disable BitPay Card
if (!appConfigService._enabledExtensions.debitcard) return false;
var secret = getParameterByName('secret', data);
var email = getParameterByName('email', data);
var otp = getParameterByName('otp', data);