Adds cache for preferences, walletDetails

This commit is contained in:
Gustavo Maximiliano Cortez 2016-09-22 11:55:23 -03:00
commit ca292813eb
No known key found for this signature in database
GPG key ID: 15EDAD8D9F2EB1AF
44 changed files with 271 additions and 241 deletions

View file

@ -1,13 +1,8 @@
'use strict';
angular.module('copayApp.controllers').controller('preferencesUnitController', function($scope, $log, configService, $ionicNavBarDelegate, $ionicHistory, gettextCatalog, walletService, profileService) {
$ionicNavBarDelegate.title(gettextCatalog.getString('Unit'));
$scope.init = function() {
var config = configService.getSync();
$scope.currentUnit = config.wallet.settings.unitCode;
}
angular.module('copayApp.controllers').controller('preferencesUnitController', function($scope, $log, configService, $ionicHistory, gettextCatalog, walletService, profileService) {
var config = configService.getSync();
$scope.unitList = [{
name: 'bits (1,000,000 bits = 1BTC)',
shortName: 'bits',
@ -43,4 +38,8 @@ angular.module('copayApp.controllers').controller('preferencesUnitController', f
});
});
};
$scope.$on("$ionicView.enter", function(event, data){
$scope.currentUnit = config.wallet.settings.unitCode;
});
});