added spend unconfirmed option back into advanced settings

This commit is contained in:
Kadir Sekha 2017-11-28 17:07:46 +09:00
commit 83b775dc7a
3 changed files with 24 additions and 4 deletions

View file

@ -4,7 +4,9 @@ angular.module('copayApp.controllers').controller('advancedSettingsController',
var updateConfig = function() {
var config = configService.getSync();
$scope.spendUnconfirmed = {
value: config.wallet.spendUnconfirmed
};
$scope.recentTransactionsEnabled = {
value: config.recentTransactions.enabled
};
@ -14,6 +16,17 @@ angular.module('copayApp.controllers').controller('advancedSettingsController',
};
$scope.spendUnconfirmedChange = function() {
var opts = {
wallet: {
spendUnconfirmed: $scope.spendUnconfirmed.value
}
};
configService.set(opts, function(err) {
if (err) $log.debug(err);
});
};
$scope.nextStepsChange = function() {
var opts = {
hideNextSteps: {

View file

@ -157,9 +157,6 @@ angular.module('copayApp.services').factory('configService', function(storageSer
// Always support Bitcoin Cash
configCache.cashSupport = true;
// Always be able to spend unconfirmed transactions
configCache.wallet.spendUnconfirmed = true;
if (!configCache.recentTransactions) {
configCache.recentTransactions = defaultConfig.recentTransactions;
}