fix enabled services

This commit is contained in:
JDonadio 2017-01-19 13:16:29 -03:00
commit c3f2230f33
4 changed files with 31 additions and 9 deletions

View file

@ -24,9 +24,9 @@ angular.module('copayApp.controllers').controller('advancedSettingsController',
$scope.recentTransactionsEnabled = {
value: config.recentTransactions.enabled
};
$scope.frequentlyUsedEnabled = {
value: config.frequentlyUsed.enabled
};
// $scope.frequentlyUsedEnabled = {
// value: config.frequentlyUsed.enabled
// };
};
$scope.spendUnconfirmedChange = function() {

View file

@ -0,0 +1,19 @@
'use strict';
angular.module('copayApp.controllers').controller('buyandsellController', function($scope, $ionicHistory, $state, configService) {
$scope.$on("$ionicView.beforeEnter", function(event, data) {
configService.whenAvailable(function(config) {
$scope.isCoinbaseEnabled = config.coinbase.enabled;
$scope.isGlideraEnabled = config.glidera.enabled;
if (!$scope.isCoinbaseEnabled && !$scope.isGlideraEnabled)
goHome();
});
});
function goHome() {
$ionicHistory.removeBackView();
$state.go('tabs.home');
};
});

View file

@ -866,6 +866,7 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr
url: '/buyandsell',
views: {
'tab-home': {
controller: 'buyandsellController',
templateUrl: 'views/buyandsell.html'
}
}