Abstract bitpayCardCredentials to appIdentity. Improve alert text on card removal.
This commit is contained in:
parent
40f0901f2e
commit
43f24ee35e
5 changed files with 87 additions and 60 deletions
|
|
@ -1,5 +1,5 @@
|
|||
'use strict';
|
||||
angular.module('copayApp.controllers').controller('bitpayCardIntroController', function($scope, $log, $state, $ionicHistory, storageService, externalLinkService, bitpayCardService, gettextCatalog, popupService) {
|
||||
angular.module('copayApp.controllers').controller('bitpayCardIntroController', function($scope, $log, $state, $ionicHistory, storageService, externalLinkService, bitpayCardService, gettextCatalog, popupService, appIdentityService) {
|
||||
|
||||
var checkOtp = function(obj, cb) {
|
||||
if (obj.otp) {
|
||||
|
|
@ -56,9 +56,9 @@ angular.module('copayApp.controllers').controller('bitpayCardIntroController', f
|
|||
});
|
||||
});
|
||||
} else {
|
||||
bitpayCardService.getCredentials(function(err, credentials) {
|
||||
appIdentityService.getIdentity(bitpayCardService.getEnvironment(), function(err, appIdentity) {
|
||||
if (err) popupService.showAlert(null, err);
|
||||
else $log.info('BitPay Debit Card Credentials: Ok.');
|
||||
else $log.info('App identity: Ok.');
|
||||
});
|
||||
}
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue