2017-01-19 13:16:29 -03:00
|
|
|
'use strict';
|
|
|
|
|
|
2017-01-23 10:32:21 -03:00
|
|
|
angular.module('copayApp.controllers').controller('buyandsellController', function($scope, $ionicHistory, configService) {
|
2017-01-19 13:16:29 -03:00
|
|
|
|
|
|
|
|
$scope.$on("$ionicView.beforeEnter", function(event, data) {
|
|
|
|
|
configService.whenAvailable(function(config) {
|
2017-01-25 11:13:18 -03:00
|
|
|
$scope.isCoinbaseEnabled = config.coinbaseV2;
|
2017-01-19 13:16:29 -03:00
|
|
|
$scope.isGlideraEnabled = config.glidera.enabled;
|
|
|
|
|
|
|
|
|
|
if (!$scope.isCoinbaseEnabled && !$scope.isGlideraEnabled)
|
2017-01-23 10:32:21 -03:00
|
|
|
$ionicHistory.goBack();
|
2017-01-19 13:16:29 -03:00
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
});
|