mirror of
https://github.com/btcpayserver/btcpayserver.git
synced 2025-02-27 16:44:53 +01:00
* Improve and unify page headers * Altcoin test fixes * Update BTCPayServer/Views/Apps/UpdateCrowdfund.cshtml Co-authored-by: Andrew Camilleri <evilkukka@gmail.com> * Update BTCPayServer/Views/Apps/UpdateCrowdfund.cshtml Co-authored-by: Andrew Camilleri <evilkukka@gmail.com> * Fix missing store name in pairing view * Fix CanUsePairing test * Bump header navigation font size * Use partial tag instead of Html.PartialAsync in views As suggested by @nicolasdorier. These are equivalent, see details [here](https://docs.microsoft.com/en-us/aspnet/core/mvc/views/partial?view=aspnetcore-3.1#partial-tag-helper). * Fix docs link As in #2432. * Update BTCPayServer/Views/Wallets/SignWithSeed.cshtml Co-authored-by: britttttk <39231115+britttttk@users.noreply.github.com> * Update BTCPayServer/Views/Wallets/WalletSendVault.cshtml Co-authored-by: britttttk <39231115+britttttk@users.noreply.github.com> * Update BTCPayServer/Views/Wallets/WalletTransactions.cshtml Co-authored-by: britttttk <39231115+britttttk@users.noreply.github.com> Co-authored-by: Andrew Camilleri <evilkukka@gmail.com> Co-authored-by: britttttk <39231115+britttttk@users.noreply.github.com>
158 lines
6.5 KiB
Text
158 lines
6.5 KiB
Text
@model WalletPSBTReadyViewModel
|
|
@{
|
|
Layout = "../Shared/_Layout.cshtml";
|
|
ViewData.SetActivePageAndTitle(WalletsNavPages.PSBT, "Review PSBT", Context.GetStoreData().StoreName);
|
|
}
|
|
|
|
<section>
|
|
<div class="container">
|
|
<div class="row">
|
|
<div class="col-lg-12 section-heading text-center">
|
|
<partial name="_StatusMessage" />
|
|
|
|
@if (Model.GlobalError != null)
|
|
{
|
|
<div class="alert alert-danger alert-dismissible" role="alert">
|
|
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
|
|
<span aria-hidden="true">×</span>
|
|
</button>
|
|
<span>@Model.GlobalError</span><br/>
|
|
</div>
|
|
}
|
|
|
|
<h2 class="mb-4">@ViewData["PageTitle"]</h2>
|
|
|
|
@if (Model.CanCalculateBalance)
|
|
{
|
|
<p>
|
|
If you broadcast this transaction, your balance will change:
|
|
@if (Model.Positive)
|
|
{
|
|
<span style="color:green;">@Model.BalanceChange</span>
|
|
}
|
|
else
|
|
{
|
|
<span style="color:red;">@Model.BalanceChange</span>
|
|
}
|
|
</p>
|
|
<p>Do you want to continue?</p>
|
|
}
|
|
else
|
|
{
|
|
<p>This PSBT is already finalized. We can't properly detect which input or output belongs to you.</p>
|
|
}
|
|
</div>
|
|
</div>
|
|
<div class="row">
|
|
<div class="col-lg-3"></div>
|
|
<div class="col-lg-6">
|
|
<h4 class="mt-4 mb-n3">Inputs</h4>
|
|
<table class="table table-sm table-responsive-lg">
|
|
<thead class="thead-inverse">
|
|
<tr>
|
|
<th style="text-align:left" class="col-md-auto">
|
|
Index
|
|
</th>
|
|
<th style="text-align:right">Amount</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
@foreach (var input in Model.Inputs)
|
|
{
|
|
<tr>
|
|
@if (input.Error != null)
|
|
{
|
|
<td style="text-align:left">
|
|
@input.Index <span class="fa fa-exclamation-triangle" style="color:red;" title="@input.Error"></span>
|
|
</td>
|
|
}
|
|
else
|
|
{
|
|
<td style="text-align:left">@input.Index</td>
|
|
}
|
|
|
|
@if (input.Positive)
|
|
{
|
|
<td style="text-align:right; color:green;">@input.BalanceChange</td>
|
|
}
|
|
else
|
|
{
|
|
<td style="text-align:right; color:red;">@input.BalanceChange</td>
|
|
}
|
|
</tr>
|
|
}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<div class="col-lg-3"></div>
|
|
</div>
|
|
|
|
<div class="row">
|
|
<div class="col-lg-3"></div>
|
|
<div class="col-lg-6">
|
|
<h4 class="mt-4 mb-n3">Outputs</h4>
|
|
<table class="table table-sm table-responsive-lg">
|
|
<thead class="thead-inverse">
|
|
<tr>
|
|
<th style="text-align:left" class="col-md-auto">
|
|
Destination
|
|
</th>
|
|
<th style="text-align:right">Amount</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
@foreach (var destination in Model.Destinations)
|
|
{
|
|
<tr>
|
|
<td style="text-align:left">@destination.Destination</td>
|
|
@if (destination.Positive)
|
|
{
|
|
<td style="text-align:right; color:green;">@destination.Balance</td>
|
|
}
|
|
else
|
|
{
|
|
<td style="text-align:right; color:red;">@destination.Balance</td>
|
|
}
|
|
</tr>
|
|
}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<div class="col-lg-3"></div>
|
|
</div>
|
|
@if (Model.FeeRate != null)
|
|
{
|
|
<div class="row">
|
|
<div class="col-lg-3"></div>
|
|
<div class="col-lg-6 text-right">
|
|
<p class="text-muted">Transaction fee rate: <b>@Model.FeeRate</b></p>
|
|
</div>
|
|
<div class="col-lg-3"></div>
|
|
</div>
|
|
}
|
|
<div class="row">
|
|
<div class="col-lg-12 text-center">
|
|
<form method="post" asp-action="WalletPSBTReady" asp-route-walletId="@Context.GetRouteValue("walletId")">
|
|
<input type="hidden" asp-for="SigningKey" />
|
|
<input type="hidden" asp-for="SigningKeyPath" />
|
|
<partial name="SigningContext" for="SigningContext" />
|
|
@if (!Model.HasErrors)
|
|
{
|
|
@if (!string.IsNullOrEmpty(Model.SigningContext?.PayJoinBIP21))
|
|
{
|
|
<button type="submit" class="btn btn-primary" name="command" value="payjoin">Broadcast (Payjoin)</button>
|
|
<span> or </span>
|
|
<button type="submit" class="btn btn-secondary" name="command" value="broadcast">Broadcast (Simple)</button>
|
|
}
|
|
else
|
|
{
|
|
<button type="submit" class="btn btn-primary" name="command" value="broadcast">Broadcast it</button>
|
|
}
|
|
<span> or </span>
|
|
}
|
|
<button type="submit" class="btn btn-secondary" name="command" value="analyze-psbt">View PSBT</button>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</section>
|