mirror of https://github.com/BTCPrivate/copay.git
fix spending password toggle
This commit is contained in:
parent
63c789ee52
commit
80bc9a839f
|
@ -3,11 +3,7 @@
|
|||
angular.module('copayApp.controllers').controller('preferencesController',
|
||||
function($scope, $rootScope, $timeout, $log, $ionicHistory, configService, profileService, fingerprintService, walletService) {
|
||||
var wallet;
|
||||
var walletId;
|
||||
|
||||
$scope.encryptEnabled = {
|
||||
value: walletService.isEncrypted(wallet)
|
||||
};
|
||||
var walletId;
|
||||
|
||||
$scope.hiddenBalanceChange = function() {
|
||||
var opts = {
|
||||
|
@ -22,6 +18,7 @@ angular.module('copayApp.controllers').controller('preferencesController',
|
|||
|
||||
$scope.encryptChange = function() {
|
||||
if (!wallet) return;
|
||||
console.log($scope.encryptEnabled.value);
|
||||
var val = $scope.encryptEnabled.value;
|
||||
|
||||
if (val && !walletService.isEncrypted(wallet)) {
|
||||
|
@ -80,7 +77,7 @@ angular.module('copayApp.controllers').controller('preferencesController',
|
|||
wallet = profileService.getWallet(data.stateParams.walletId);
|
||||
walletId = wallet.credentials.walletId;
|
||||
$scope.wallet = wallet;
|
||||
|
||||
|
||||
$scope.externalSource = null;
|
||||
|
||||
if (!wallet)
|
||||
|
@ -92,6 +89,10 @@ angular.module('copayApp.controllers').controller('preferencesController',
|
|||
value: $scope.wallet.balanceHidden
|
||||
};
|
||||
|
||||
$scope.encryptEnabled = {
|
||||
value: walletService.isEncrypted(wallet)
|
||||
};
|
||||
|
||||
$scope.touchIdAvailable = fingerprintService.isAvailable();
|
||||
$scope.touchIdEnabled = {
|
||||
value: config.touchIdFor ? config.touchIdFor[walletId] : null
|
||||
|
|
Loading…
Reference in New Issue