buyAndSell services + nextSteps

This commit is contained in:
Matias Alejo Garcia 2017-01-30 18:04:17 -03:00
commit d85da2cc45
No known key found for this signature in database
GPG key ID: 02470DB551277AB3
15 changed files with 340 additions and 192 deletions

View file

@ -1,14 +1,11 @@
'use strict';
angular.module('copayApp.controllers').controller('buyandsellController', function($scope, $ionicHistory, configService) {
angular.module('copayApp.controllers').controller('buyandsellController', function($scope, $ionicHistory, buyAndSellService, lodash) {
$scope.$on("$ionicView.beforeEnter", function(event, data) {
configService.whenAvailable(function(config) {
$scope.isCoinbaseEnabled = config.coinbaseV2;
$scope.isGlideraEnabled = config.glidera.enabled;
$scope.services = buyAndSellService.get();
if (!$scope.isCoinbaseEnabled && !$scope.isGlideraEnabled)
$ionicHistory.goBack();
});
if (lodash.isEmpty($scope.services))
$ionicHistory.goBack();
});
});