From b7c65b2ba6e6f636b23ca1118ae5397cfb7ccbdd Mon Sep 17 00:00:00 2001 From: Kukks Date: Fri, 12 Jun 2020 13:58:55 +0200 Subject: [PATCH] Add AlwaysIncludeNonWitnessUTXO to Wallet Send --- BTCPayServer.Common/BTCPayServer.Common.csproj | 2 +- BTCPayServer/Controllers/WalletsController.PSBT.cs | 2 ++ BTCPayServer/Models/WalletViewModels/WalletSendModel.cs | 2 ++ BTCPayServer/Views/Wallets/WalletSend.cshtml | 7 +++++++ 4 files changed, 12 insertions(+), 1 deletion(-) diff --git a/BTCPayServer.Common/BTCPayServer.Common.csproj b/BTCPayServer.Common/BTCPayServer.Common.csproj index 68f78a97f..6293fed52 100644 --- a/BTCPayServer.Common/BTCPayServer.Common.csproj +++ b/BTCPayServer.Common/BTCPayServer.Common.csproj @@ -4,6 +4,6 @@ - + diff --git a/BTCPayServer/Controllers/WalletsController.PSBT.cs b/BTCPayServer/Controllers/WalletsController.PSBT.cs index 2ce64885e..ea1e77bf5 100644 --- a/BTCPayServer/Controllers/WalletsController.PSBT.cs +++ b/BTCPayServer/Controllers/WalletsController.PSBT.cs @@ -45,6 +45,8 @@ namespace BTCPayServer.Controllers if (sendModel.AllowFeeBump is WalletSendModel.ThreeStateBool.No) psbtRequest.RBF = false; } + + psbtRequest.AlwaysIncludeNonWitnessUTXO = sendModel.AlwaysIncludeNonWitnessUTXO; psbtRequest.FeePreference = new FeePreference(); if (sendModel.FeeSatoshiPerByte is decimal v && diff --git a/BTCPayServer/Models/WalletViewModels/WalletSendModel.cs b/BTCPayServer/Models/WalletViewModels/WalletSendModel.cs index 0526b9cf4..f0bbfb7a3 100644 --- a/BTCPayServer/Models/WalletViewModels/WalletSendModel.cs +++ b/BTCPayServer/Models/WalletViewModels/WalletSendModel.cs @@ -51,6 +51,8 @@ namespace BTCPayServer.Models.WalletViewModels public string Fiat { get; set; } public string RateError { get; set; } public bool SupportRBF { get; set; } + [Display(Name = "Always include non-witness UTXO if available")] + public bool AlwaysIncludeNonWitnessUTXO { get; set; } [Display(Name = "Allow fee increase (RBF)")] public ThreeStateBool AllowFeeBump { get; set; } diff --git a/BTCPayServer/Views/Wallets/WalletSend.cshtml b/BTCPayServer/Views/Wallets/WalletSend.cshtml index 9bcfff55d..1407d3144 100644 --- a/BTCPayServer/Views/Wallets/WalletSend.cshtml +++ b/BTCPayServer/Views/Wallets/WalletSend.cshtml @@ -180,6 +180,13 @@ + +
+
+ + +
+
@if (Model.SupportRBF) {