mirror of
https://github.com/btcpayserver/btcpayserver.git
synced 2025-03-10 09:19:24 +01:00
Remove randomize RBF from wallet UI advanced settings (#5709)
* Remove randomize RBF from wallet UI advanced settings * remove support RBF and allow bump fee from wallet send model * update psbt RBF
This commit is contained in:
parent
6290b0f3bf
commit
a8fdc4798d
5 changed files with 2 additions and 33 deletions
|
@ -518,10 +518,6 @@ namespace BTCPayServer.Controllers.Greenfield
|
||||||
Outputs = outputs,
|
Outputs = outputs,
|
||||||
AlwaysIncludeNonWitnessUTXO = true,
|
AlwaysIncludeNonWitnessUTXO = true,
|
||||||
InputSelection = request.SelectedInputs?.Any() is true,
|
InputSelection = request.SelectedInputs?.Any() is true,
|
||||||
AllowFeeBump =
|
|
||||||
!request.RBF.HasValue ? WalletSendModel.ThreeStateBool.Maybe :
|
|
||||||
request.RBF.Value ? WalletSendModel.ThreeStateBool.Yes :
|
|
||||||
WalletSendModel.ThreeStateBool.No,
|
|
||||||
FeeSatoshiPerByte = request.FeeRate?.SatoshiPerByte,
|
FeeSatoshiPerByte = request.FeeRate?.SatoshiPerByte,
|
||||||
NoChange = request.NoChange
|
NoChange = request.NoChange
|
||||||
},
|
},
|
||||||
|
|
|
@ -42,15 +42,7 @@ namespace BTCPayServer.Controllers
|
||||||
psbtDestination.Amount = Money.Coins(transactionOutput.Amount.Value);
|
psbtDestination.Amount = Money.Coins(transactionOutput.Amount.Value);
|
||||||
psbtDestination.SubstractFees = transactionOutput.SubtractFeesFromOutput;
|
psbtDestination.SubstractFees = transactionOutput.SubtractFeesFromOutput;
|
||||||
}
|
}
|
||||||
|
psbtRequest.RBF = network.SupportRBF ? true : null;
|
||||||
if (network.SupportRBF)
|
|
||||||
{
|
|
||||||
if (sendModel.AllowFeeBump is WalletSendModel.ThreeStateBool.Yes)
|
|
||||||
psbtRequest.RBF = true;
|
|
||||||
if (sendModel.AllowFeeBump is WalletSendModel.ThreeStateBool.No)
|
|
||||||
psbtRequest.RBF = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
psbtRequest.AlwaysIncludeNonWitnessUTXO = sendModel.AlwaysIncludeNonWitnessUTXO;
|
psbtRequest.AlwaysIncludeNonWitnessUTXO = sendModel.AlwaysIncludeNonWitnessUTXO;
|
||||||
|
|
||||||
psbtRequest.FeePreference = new FeePreference();
|
psbtRequest.FeePreference = new FeePreference();
|
||||||
|
|
|
@ -513,8 +513,6 @@ namespace BTCPayServer.Controllers
|
||||||
recommendedFees.Select(tuple => tuple.GetAwaiter().GetResult()).Where(option => option != null).ToList();
|
recommendedFees.Select(tuple => tuple.GetAwaiter().GetResult()).Where(option => option != null).ToList();
|
||||||
|
|
||||||
model.FeeSatoshiPerByte = recommendedFees[1].GetAwaiter().GetResult()?.FeeRate;
|
model.FeeSatoshiPerByte = recommendedFees[1].GetAwaiter().GetResult()?.FeeRate;
|
||||||
model.SupportRBF = network.SupportRBF;
|
|
||||||
|
|
||||||
model.CryptoDivisibility = network.Divisibility;
|
model.CryptoDivisibility = network.Divisibility;
|
||||||
using (CancellationTokenSource cts = new CancellationTokenSource())
|
using (CancellationTokenSource cts = new CancellationTokenSource())
|
||||||
{
|
{
|
||||||
|
@ -570,7 +568,6 @@ namespace BTCPayServer.Controllers
|
||||||
if (network == null || network.ReadonlyWallet)
|
if (network == null || network.ReadonlyWallet)
|
||||||
return NotFound();
|
return NotFound();
|
||||||
|
|
||||||
vm.SupportRBF = network.SupportRBF;
|
|
||||||
vm.NBXSeedAvailable = await GetSeed(walletId, network) != null;
|
vm.NBXSeedAvailable = await GetSeed(walletId, network) != null;
|
||||||
if (!string.IsNullOrEmpty(bip21))
|
if (!string.IsNullOrEmpty(bip21))
|
||||||
{
|
{
|
||||||
|
|
|
@ -55,11 +55,8 @@ namespace BTCPayServer.Models.WalletViewModels
|
||||||
public int CryptoDivisibility { get; set; }
|
public int CryptoDivisibility { get; set; }
|
||||||
public string Fiat { get; set; }
|
public string Fiat { get; set; }
|
||||||
public string RateError { get; set; }
|
public string RateError { get; set; }
|
||||||
public bool SupportRBF { get; set; }
|
|
||||||
[Display(Name = "Always include non-witness UTXO if available")]
|
[Display(Name = "Always include non-witness UTXO if available")]
|
||||||
public bool AlwaysIncludeNonWitnessUTXO { get; set; }
|
public bool AlwaysIncludeNonWitnessUTXO { get; set; }
|
||||||
[Display(Name = "Allow fee increase (RBF)")]
|
|
||||||
public ThreeStateBool AllowFeeBump { get; set; }
|
|
||||||
|
|
||||||
public bool NBXSeedAvailable { get; set; }
|
public bool NBXSeedAvailable { get; set; }
|
||||||
[Display(Name = "PayJoin BIP21")]
|
[Display(Name = "PayJoin BIP21")]
|
||||||
|
|
|
@ -271,20 +271,7 @@
|
||||||
<label asp-for="AlwaysIncludeNonWitnessUTXO" class="form-check-label"></label>
|
<label asp-for="AlwaysIncludeNonWitnessUTXO" class="form-check-label"></label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@if (Model.SupportRBF)
|
|
||||||
{
|
|
||||||
<div class="form-group">
|
|
||||||
<label asp-for="AllowFeeBump" class="form-label"></label>
|
|
||||||
<a href="https://docs.btcpayserver.org/Wallet/#rbf-replace-by-fee" target="_blank" rel="noreferrer noopener">
|
|
||||||
<vc:icon symbol="info" />
|
|
||||||
</a>
|
|
||||||
<select asp-for="AllowFeeBump" class="form-select w-auto">
|
|
||||||
<option value="Maybe">Randomize for higher privacy</option>
|
|
||||||
<option value="Yes">Yes</option>
|
|
||||||
<option value="No">No</option>
|
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
}
|
|
||||||
@if (!string.IsNullOrEmpty(Model.PayJoinBIP21))
|
@if (!string.IsNullOrEmpty(Model.PayJoinBIP21))
|
||||||
{
|
{
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
|
|
Loading…
Add table
Reference in a new issue