mirror of https://github.com/BTCPrivate/copay.git
Merge pull request #277 from JDonadio/bug/spending-password
Fix spending password require on mobile
This commit is contained in:
commit
9a8bcc34a9
|
@ -6,6 +6,11 @@ angular.module('copayApp.controllers').controller('preferencesController',
|
||||||
var walletId = wallet.credentials.walletId;
|
var walletId = wallet.credentials.walletId;
|
||||||
$scope.wallet = wallet;
|
$scope.wallet = wallet;
|
||||||
|
|
||||||
|
$scope.encryptEnabled = {
|
||||||
|
value: walletService.isEncrypted(wallet)
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
$scope.encryptChange = function() {
|
$scope.encryptChange = function() {
|
||||||
if (!wallet) return;
|
if (!wallet) return;
|
||||||
var val = $scope.encryptEnabled.value;
|
var val = $scope.encryptEnabled.value;
|
||||||
|
@ -18,6 +23,9 @@ angular.module('copayApp.controllers').controller('preferencesController',
|
||||||
|
|
||||||
// ToDo show error?
|
// ToDo show error?
|
||||||
$scope.encryptEnabled.value = false;
|
$scope.encryptEnabled.value = false;
|
||||||
|
$timeout(function() {
|
||||||
|
$scope.$apply();
|
||||||
|
});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
profileService.updateCredentials(JSON.parse(wallet.export()), function() {
|
profileService.updateCredentials(JSON.parse(wallet.export()), function() {
|
||||||
|
@ -32,6 +40,9 @@ angular.module('copayApp.controllers').controller('preferencesController',
|
||||||
|
|
||||||
// ToDo show error?
|
// ToDo show error?
|
||||||
$scope.encryptEnabled.value = true;
|
$scope.encryptEnabled.value = true;
|
||||||
|
$timeout(function() {
|
||||||
|
$scope.$apply();
|
||||||
|
});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
profileService.updateCredentials(JSON.parse(wallet.export()), function() {
|
profileService.updateCredentials(JSON.parse(wallet.export()), function() {
|
||||||
|
@ -64,9 +75,7 @@ angular.module('copayApp.controllers').controller('preferencesController',
|
||||||
|
|
||||||
var config = configService.getSync();
|
var config = configService.getSync();
|
||||||
|
|
||||||
$scope.encryptEnabled = {
|
|
||||||
value: walletService.isEncrypted(wallet)
|
|
||||||
};
|
|
||||||
|
|
||||||
if (wallet.isPrivKeyExternal)
|
if (wallet.isPrivKeyExternal)
|
||||||
$scope.externalSource = wallet.getPrivKeyExternalSourceName() == 'ledger' ? 'Ledger' : 'Trezor';
|
$scope.externalSource = wallet.getPrivKeyExternalSourceName() == 'ledger' ? 'Ledger' : 'Trezor';
|
||||||
|
|
Loading…
Reference in New Issue