btcpayserver/BTCPayServer/Views/UIWallets/_PSBTInfo.cshtml
d11n df5add04e2
Wallet display improvements (#3755)
* Improve fiat value text group display

* Improve generate/cheat button display

* Improve PSBT table display
2022-05-18 15:45:59 +09:00

67 lines
1.8 KiB
Plaintext

@model WalletPSBTReadyViewModel
@if (Model.CanCalculateBalance)
{
<p class="lead text-center text-secondary">
This transaction will change your balance:
<br>
<span class="text-@(Model.Positive ? "success" : "danger")">@Model.BalanceChange</span>
</p>
}
<div id="inputs">
<h4 class="mb-n3">Inputs</h4>
<table class="table">
<thead>
<tr>
<th>Index</th>
<th class="text-end">Amount</th>
</tr>
</thead>
<tbody>
@foreach (var input in Model.Inputs)
{
<tr>
@if (input.Error != null)
{
<td>
@input.Index <span class="fa fa-exclamation-triangle text-danger" title="@input.Error"></span>
</td>
}
else
{
<td>@input.Index</td>
}
<td class="text-end text-@(input.Positive ? "success" : "danger")">@input.BalanceChange</td>
</tr>
}
</tbody>
</table>
</div>
<div id="outputs" class="mt-4">
<h4 class="mb-n3">Outputs</h4>
<table class="table">
<thead>
<tr>
<th>Destination</th>
<th class="text-end">Amount</th>
</tr>
</thead>
<tbody>
@foreach (var destination in Model.Destinations)
{
<tr>
<td class="text-break">@destination.Destination</td>
<td class="text-end text-@(destination.Positive ? "success" : "danger")">@destination.Balance</td>
</tr>
}
</tbody>
</table>
</div>
@if (Model.FeeRate != null)
{
<p class="text-muted text-end">Transaction fee rate: <b>@Model.FeeRate</b></p>
}