mirror of
https://github.com/btcpayserver/btcpayserver.git
synced 2024-11-19 18:11:36 +01:00
Randomize RBF if the user does not care
This commit is contained in:
parent
32f2acee53
commit
36630d9586
@ -40,7 +40,10 @@ namespace BTCPayServer.Controllers
|
||||
|
||||
if (network.SupportRBF)
|
||||
{
|
||||
psbtRequest.RBF = !sendModel.DisableRBF;
|
||||
if (sendModel.AllowFeeBump is WalletSendModel.ThreeStateBool.Yes)
|
||||
psbtRequest.RBF = true;
|
||||
if (sendModel.AllowFeeBump is WalletSendModel.ThreeStateBool.No)
|
||||
psbtRequest.RBF = false;
|
||||
}
|
||||
|
||||
psbtRequest.FeePreference = new FeePreference();
|
||||
|
@ -7,6 +7,12 @@ namespace BTCPayServer.Models.WalletViewModels
|
||||
{
|
||||
public class WalletSendModel
|
||||
{
|
||||
public enum ThreeStateBool
|
||||
{
|
||||
Maybe,
|
||||
Yes,
|
||||
No
|
||||
}
|
||||
public class FeeRateOption
|
||||
{
|
||||
public TimeSpan Target { get; set; }
|
||||
@ -45,8 +51,8 @@ namespace BTCPayServer.Models.WalletViewModels
|
||||
public string Fiat { get; set; }
|
||||
public string RateError { get; set; }
|
||||
public bool SupportRBF { get; set; }
|
||||
[Display(Name = "Disable RBF")]
|
||||
public bool DisableRBF { get; set; }
|
||||
[Display(Name = "Allow fee increase (RBF)")]
|
||||
public ThreeStateBool AllowFeeBump { get; set; }
|
||||
|
||||
public bool NBXSeedAvailable { get; set; }
|
||||
[Display(Name = "PayJoin Endpoint Url")]
|
||||
|
@ -171,21 +171,27 @@
|
||||
</button>
|
||||
<div id="accordian-advanced" class="collapse" aria-labelledby="accordian-advanced-header" data-parent="#accordian-advanced">
|
||||
<div class="card-body">
|
||||
<div class="form-check">
|
||||
<input asp-for="NoChange" class="form-check-input" />
|
||||
<label asp-for="NoChange" class="form-check-label"></label>
|
||||
<a href="https://docs.btcpayserver.org/features/wallet#make-sure-no-change-utxo-is-created-expert-mode" target="_blank">
|
||||
<span class="fa fa-question-circle-o" title="More information..."></span>
|
||||
</a>
|
||||
<div class="form-group">
|
||||
<div class="form-check">
|
||||
<input asp-for="NoChange" class="form-check-input" />
|
||||
<label asp-for="NoChange" class="form-check-label"></label>
|
||||
<a href="https://docs.btcpayserver.org/features/wallet#make-sure-no-change-utxo-is-created-expert-mode" target="_blank">
|
||||
<span class="fa fa-question-circle-o" title="More information..."></span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
@if (Model.SupportRBF)
|
||||
{
|
||||
<div class="form-check">
|
||||
<input asp-for="DisableRBF" class="form-check-input" />
|
||||
<label asp-for="DisableRBF" class="form-check-label"></label>
|
||||
<a href="https://bitcoin.org/en/glossary/rbf" target="_blank">
|
||||
<div class="form-group">
|
||||
<label asp-for="AllowFeeBump"></label>
|
||||
<a href="https://bitcoinops.org/en/rbf-in-the-wild/" target="_blank">
|
||||
<span class="fa fa-question-circle-o" title="More information..."></span>
|
||||
</a>
|
||||
<select asp-for="AllowFeeBump" class="form-control">
|
||||
<option value="Maybe">Randomize for higher privacy</option>
|
||||
<option value="Yes">Yes</option>
|
||||
<option value="No">No</option>
|
||||
</select>
|
||||
</div>
|
||||
}
|
||||
@if (!string.IsNullOrEmpty(Model.PayJoinEndpointUrl))
|
||||
|
Loading…
Reference in New Issue
Block a user