Adds next step for external services

This commit is contained in:
Gustavo Maximiliano Cortez 2016-08-26 11:11:14 -03:00
commit c3188d7d17
No known key found for this signature in database
GPG key ID: 15EDAD8D9F2EB1AF
12 changed files with 156 additions and 101 deletions

View file

@ -1,7 +1,7 @@
'use strict';
angular.module('copayApp.controllers').controller('tabHomeController',
function($rootScope, $timeout, $scope, $state, lodash, profileService, walletService, configService, txFormatService, $ionicModal, $log, platformInfo) {
function($rootScope, $timeout, $scope, $state, lodash, profileService, walletService, configService, txFormatService, $ionicModal, $log, platformInfo, storageService) {
var setNotifications = function(notifications) {
var n = walletService.processNotifications(notifications, 5);
@ -68,7 +68,14 @@ console.log('[tab-home.js.39]', wallet.name, n); //TODO
});
};
$scope.externalServices = {};
$scope.nextStep = function() {
lodash.each(['AmazonGiftCards', 'BitpayCard', 'BuyAndSell'], function(service) {
storageService.getNextStep(service, function(err, value) {
$scope.externalServices[service] = value ? true : false;
});
});
};
$scope.bitpayCardEnabled = true; // TODO