Files
btcpayserver-breez-nodeless…/BTCPayServer.Plugins.BreezSpark/Views/BreezSpark/Sweep.cshtml
Aljaz Ceru 90a5c9c098 Fix: Update all view references from Breez to BreezSpark
- Fixed controller action references in Info.cshtml
- Updated partial view path in Payments.cshtml
- Fixed all SetActivePage calls to use BreezSpark
- Updated BreezPaymentsTable to BreezSparkPaymentsTable
- Fixed CSS IDs and selectors throughout views
- All navigation now correctly references BreezSpark controller
2025-12-10 21:17:46 +01:00

79 lines
3.3 KiB
Plaintext

@using BTCPayServer
@using BTCPayServer.Models.StoreViewModels
@using BTCPayServer.Plugins.BreezSpark
@using BTCPayServer.Security
@using BTCPayServer.Services.Invoices
@using Microsoft.AspNetCore.Mvc.TagHelpers
@inject BreezSparkService BreezService
@inject PaymentMethodHandlerDictionary PaymentMethodHandlerDictionary
@* @inject BTCPayNetworkProvider BTCPayNetworkProvider *@
@{
Layout = "_Layout";
ViewData.SetActivePage("BreezSpark", "Sweep", "Sweep");
string storeId = null;
if (Model is string s)
{
storeId = s;
}
else if (Model is StoreDashboardViewModel dashboardModel)
{
storeId = dashboardModel.StoreId;
}
else
{
storeId = Context.GetImplicitStoreId();
}
var sdk = BreezService.GetClient(storeId)?.Sdk;
if (sdk is null)
return;
@* TODO: Fix for v2.2.1 - derivation settings check needed *@
// Use standard fee rates since RecommendedFees API may have changed
var standardFees = new { fastestFee = 10, halfHourFee = 5, hourFee = 3, economyFee = 2, minimumFee = 1 };
}
<datalist id="fees">
<option value="@standardFees.fastestFee">Fastest fee (@standardFees.fastestFee sat/vB)</option>
<option value="@standardFees.halfHourFee">Half hour fee (@standardFees.halfHourFee sat/vB)</option>
<option value="@standardFees.hourFee">Hour fee (@standardFees.hourFee sat/vB)</option>
<option value="@standardFees.economyFee">Economic fee (@standardFees.economyFee sat/vB)</option>
<option value="@standardFees.minimumFee">Minimum fee (@standardFees.minimumFee sat/vB)</option>
</datalist>
<datalist list="addresses">
@*
@if (derivationSettings is not null)
{
<option value="store"> Store wallet</option>
}
*@
</datalist>
<form method="post" asp-action="Sweep" asp-route-storeId="@storeId">
<div class="row mb-4">
<div class="col-12">
<div class="d-flex align-items-center justify-content-between mb-3">
<h3 class="mb-0">
<span>@ViewData["Title"]</span>
<a href="https://docs.btcpayserver.org/Forms" target="_blank" rel="noreferrer noopener" title="More information...">
<vc:icon symbol="info"/>
</a>
</h3>
<div class="d-flex gap-3 mt-3 mt-sm-0">
<button type="submit" class="btn btn-primary">Sweep Funds</button>
</div>
</div>
<div asp-validation-summary="ModelOnly" class="text-danger"></div>
<div class="form-group">
<label for="address" class="form-label" data-required>Destination Address</label>
<input type="text" id="address" list="addresses" name="address" class="form-control" required/>
<small class="form-text text-muted">Address to sweep funds to</small>
</div>
<div class="form-group">
<label for="satPerByte" class="form-label">Fee Rate (sat/vB)</label>
<input type="number" id="satPerByte" name="satPerByte" list="fees" class="form-control" value="@standardFees.halfHourFee"/>
<small class="form-text text-muted">Choose from preset fee rates or enter custom value</small>
</div>
<button type="submit" class="btn btn-primary">Sweep Funds</button>
</div>
</div>
</form>