Merge pull request #5091 from cmgustavo/ref/move-bitpaycard-preferences
Moves bitpayCard pref to tab-settings
This commit is contained in:
commit
1669cedd6a
5 changed files with 26 additions and 9 deletions
|
|
@ -1,6 +1,6 @@
|
|||
'use strict';
|
||||
|
||||
angular.module('copayApp.controllers').controller('tabSettingsController', function($scope, $window, $ionicModal, uxLanguage, platformInfo, profileService, feeService, configService, externalLinkService) {
|
||||
angular.module('copayApp.controllers').controller('tabSettingsController', function($scope, $window, $ionicModal, lodash, uxLanguage, platformInfo, profileService, feeService, configService, externalLinkService, bitpayCardService) {
|
||||
|
||||
var updateConfig = function() {
|
||||
|
||||
|
|
@ -23,6 +23,8 @@ angular.module('copayApp.controllers').controller('tabSettingsController', funct
|
|||
$scope.currentFeeLevel = feeService.getCurrentFeeLevel();
|
||||
|
||||
$scope.wallets = profileService.getWallets();
|
||||
|
||||
$scope.bitpayCardEnabled = config.bitpayCard.enabled;
|
||||
};
|
||||
|
||||
$scope.openExternalLink = function(url, optIn, title, message, okText, cancelText) {
|
||||
|
|
@ -31,6 +33,12 @@ angular.module('copayApp.controllers').controller('tabSettingsController', funct
|
|||
|
||||
$scope.$on("$ionicView.beforeEnter", function(event, data) {
|
||||
updateConfig();
|
||||
|
||||
bitpayCardService.getBitpayDebitCards(function(err, data) {
|
||||
if (!lodash.isEmpty(data)) {
|
||||
$scope.bitpayCards = true;
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue