added spend unconfirmed option back into advanced settings
This commit is contained in:
parent
a722a77ead
commit
83b775dc7a
3 changed files with 24 additions and 4 deletions
|
|
@ -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: {
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,6 +7,16 @@
|
|||
|
||||
<ion-content>
|
||||
<div class="settings-list list">
|
||||
|
||||
<ion-toggle class="has-comment" ng-model="spendUnconfirmed.value" toggle-class="toggle-balanced" ng-change="spendUnconfirmedChange()">
|
||||
<span class="toggle-label" translate>Use Unconfirmed Funds</span>
|
||||
</ion-toggle>
|
||||
<div class="comment" translate>
|
||||
If enabled, wallets will also try to spend unconfirmed funds. This option may cause transaction delays.
|
||||
</div>
|
||||
|
||||
<div class="item item-divider"></div>
|
||||
|
||||
<ion-toggle class="has-comment" ng-model="recentTransactionsEnabled.value" toggle-class="toggle-balanced" ng-change="recentTransactionsChange()">
|
||||
<span class="toggle-label" translate>Recent Transaction Card</span>
|
||||
</ion-toggle>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue