Feature: RBF and UX improvement to fee bumping

This commit is contained in:
nicolas.dorier
2025-01-29 19:26:22 +09:00
parent 7355be48ee
commit 2911771f19
26 changed files with 1229 additions and 187 deletions

View File

@@ -663,6 +663,8 @@ namespace BTCPayServer.Controllers
var bumpableAddresses = await GetAddresses(btc, selectedItems);
var utxos = await explorer.GetUTXOsAsync(derivationScheme);
var bumpableUTXOs = utxos.GetUnspentUTXOs().Where(u => u.Confirmations == 0 && bumpableAddresses.Contains(u.ScriptPubKey.Hash.ToString())).ToArray();
if (bumpableUTXOs.Length == 0)
return NotSupported("No UTXOs available for bumping the selected invoices");
var parameters = new MultiValueDictionary<string, string>();
foreach (var utxo in bumpableUTXOs)
{
@@ -671,7 +673,7 @@ namespace BTCPayServer.Controllers
return View("PostRedirect", new PostRedirectViewModel
{
AspController = "UIWallets",
AspAction = nameof(UIWalletsController.WalletCPFP),
AspAction = nameof(UIWalletsController.WalletBumpFee),
RouteParameters = {
{ "walletId", new WalletId(storeId, network.CryptoCode).ToString() },
{ "returnUrl", Url.Action(nameof(ListInvoices), new { storeId }) }