set 24 hours timer

This commit is contained in:
Gabriel Bazán 2016-11-08 12:37:05 -03:00
commit ac9cee8d6d
5 changed files with 22 additions and 7 deletions

View file

@ -1,6 +1,6 @@
'use strict';
angular.module('copayApp.controllers').controller('welcomeController', function($scope, $state, $timeout, $ionicConfig, $log, profileService, startupService) {
angular.module('copayApp.controllers').controller('welcomeController', function($scope, $state, $timeout, $ionicConfig, $log, profileService, startupService, storageService) {
$ionicConfig.views.swipeBackEnabled(false);
@ -19,7 +19,13 @@ angular.module('copayApp.controllers').controller('welcomeController', function(
$log.debug('Creating profile');
profileService.createProfile(function(err) {
if (err) $log.warn(err);
$scope.setProfileCreationTime();
});
};
$scope.setProfileCreationTime = function() {
var now = moment().unix() * 1000 + 24 * 60 * 60 * 1000;
storageService.setProfileCreationTime(now, function() {});
};
});