Advanced send options
This commit is contained in:
parent
77abe774ac
commit
779db5a06c
6 changed files with 73 additions and 33 deletions
|
|
@ -9,10 +9,25 @@ angular.module('copayApp.controllers').controller('preferencesController',
|
|||
name: config.wallet.settings.alternativeName,
|
||||
isoCode: config.wallet.settings.alternativeIsoCode
|
||||
};
|
||||
$scope.spendUnconfirmed = config.wallet.spendUnconfirmed;
|
||||
var fc = profileService.focusedClient;
|
||||
if (fc)
|
||||
$scope.encrypt = fc.hasPrivKeyEncrypted();
|
||||
|
||||
var unwatchSpendUnconfirmed = $scope.$watch('spendUnconfirmed', function(newVal, oldVal) {
|
||||
if (newVal == oldVal) return;
|
||||
var opts = {
|
||||
wallet: {
|
||||
spendUnconfirmed: newVal
|
||||
}
|
||||
};
|
||||
$rootScope.$emit('Local/SpendUnconfirmedUpdated');
|
||||
|
||||
configService.set(opts, function(err) {
|
||||
if (err) $log.debug(err);
|
||||
});
|
||||
});
|
||||
|
||||
var unwatch = $scope.$watch('encrypt', function(val) {
|
||||
var fc = profileService.focusedClient;
|
||||
if (!fc) return;
|
||||
|
|
@ -49,5 +64,6 @@ angular.module('copayApp.controllers').controller('preferencesController',
|
|||
|
||||
$scope.$on('$destroy', function() {
|
||||
unwatch();
|
||||
unwatchSpendUnconfirmed();
|
||||
});
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue