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

@ -28,10 +28,10 @@ angular.module('copayApp.controllers').controller('tabSettingsController', funct
$scope.$digest();
});
}
$scope.spendUnconfirmed = config.wallet.spendUnconfirmed;
$scope.glideraEnabled = config.glidera.enabled;
$scope.spendUnconfirmed = {value : config.wallet.spendUnconfirmed};
$scope.glideraEnabled = {value: config.glidera.enabled};
$scope.coinbaseEnabled = config.coinbase.enabled;
$scope.pushNotifications = config.pushNotifications.enabled;
$scope.pushNotifications = {value: config.pushNotifications.enabled};
$scope.otherWallets = lodash.filter(profileService.getWallets(self.network), function(w) {
return w.id != self.walletId;
});
@ -49,7 +49,7 @@ angular.module('copayApp.controllers').controller('tabSettingsController', funct
$scope.spendUnconfirmedChange = function() {
var opts = {
wallet: {
spendUnconfirmed: $scope.spendUnconfirmed
spendUnconfirmed: $scope.spendUnconfirmed.value
}
};
configService.set(opts, function(err) {
@ -60,7 +60,7 @@ angular.module('copayApp.controllers').controller('tabSettingsController', funct
$scope.pushNotificationsChange = function() {
var opts = {
pushNotifications: {
enabled: $scope.pushNotifications
enabled: $scope.pushNotifications.value
}
};
configService.set(opts, function(err) {
@ -75,7 +75,7 @@ angular.module('copayApp.controllers').controller('tabSettingsController', funct
$scope.glideraChange = function() {
var opts = {
glidera: {
enabled: $scope.glideraEnabled
enabled: $scope.glideraEnabled.value
}
};
configService.set(opts, function(err) {