clean services

This commit is contained in:
JDonadio 2017-03-10 17:19:32 -03:00
parent 1df951ad85
commit 775b16e0fd
2 changed files with 20 additions and 3 deletions

View File

@ -15,7 +15,7 @@ angular.module('copayApp.controllers').controller('advancedSettingsController',
value: config.hideNextSteps.enabled
};
$scope.usePincode = {
enabled: config.pincode ? config.pincode.enabled : false
value: config.pincode ? config.pincode.enabled : false
};
};
@ -41,6 +41,23 @@ angular.module('copayApp.controllers').controller('advancedSettingsController',
});
};
$scope.savePincodeChanges = function(val) {
if (!val || val.length < 4) {
$scope.usePincode = {
value: false
}
return;
}
var opts = {
usePincode: {
enabled: $scope.usePincode.enabled
},
};
configService.set(opts, function(err) {
if (err) $log.debug(err);
});
};
$scope.recentTransactionsChange = function() {
var opts = {
recentTransactions: {

View File

@ -29,14 +29,14 @@
<span class="toggle-label" translate>Hide Next Steps Card</span>
</ion-toggle>
<!-- <div ng-if="isCordova"> -->
<div ng-if="isCordova">
<div class="item item-divider"></div>
<a class="item item-icon-right" ui-sref="tabs.lockapp">
<span translate>Lock App</span>
<i class="icon bp-arrow-right"></i>
</a>
<!-- </div> -->
</div>
</div>
</ion-content>
</ion-view>