Merge pull request #5695 from cmgustavo/feat/disable-bp-card-copay
Disable BitPay Card from appConfig
This commit is contained in:
commit
9c89b68722
3 changed files with 9 additions and 3 deletions
|
|
@ -103,8 +103,8 @@
|
|||
"run:android": "cordova run android --device",
|
||||
"log:android": "adb logcat | grep chromium",
|
||||
"sign:android": "rm -f platforms/android/build/outputs/apk/android-release-signed-aligned.apk; jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore ../copay.keystore -signedjar platforms/android/build/outputs/apk/android-release-signed.apk platforms/android/build/outputs/apk/android-release-unsigned.apk copay_play && ../android-sdk-macosx/build-tools/21.1.1/zipalign -v 4 platforms/android/build/outputs/apk/android-release-signed.apk platforms/android/build/outputs/apk/android-release-signed-aligned.apk",
|
||||
"apply:copay": "npm i && cd app-template && node apply.js copay && cordova prepare",
|
||||
"apply:bitpay": "npm i && cd app-template && node apply.js bitpay && cordova prepare",
|
||||
"apply:copay": "npm i fs-extra && cd app-template && node apply.js copay && npm i && cordova prepare",
|
||||
"apply:bitpay": "npm i fs-extra && cd app-template && node apply.js bitpay && npm i && cordova prepare",
|
||||
"test": "echo \"no package tests configured\"",
|
||||
"clean": "trash platforms && trash plugins && cordova prepare",
|
||||
"unstage-package": "git reset package.json",
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue