btcpayserver/BTCPayServer/Views/Wallets/WalletPSBTReady.cshtml

87 lines
3.6 KiB
Text

@model WalletPSBTReadyViewModel
@{
Layout = "../Shared/_Layout.cshtml";
}
<section>
<div class="container">
@if (Model.Errors != 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">&times;</span></button>
@foreach (var error in Model.Errors)
{
<span>@error</span><br />
}
</div>
}
<div class="row">
<div class="col-lg-12 text-center">
<h2 class="section-heading">Transaction review</h2>
<hr class="primary">
<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>
}, do you want to continue?
</p>
</div>
</div>
<div class="row">
<div class="col-lg-3 text-center"></div>
<div class="col-lg-6 text-center">
<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 text-center"></div>
</div>
@if (Model.Fee != null)
{
<div class="row">
<div class="col-lg-3 text-center"></div>
<div class="col-lg-6 text-left">
<p>Transaction fee: <span style="color: red">@Model.Fee</span></p>
</div>
<div class="col-lg-3 text-center"></div>
</div>
}
<div class="row">
<div class="col-lg-12 text-center">
<form method="post" asp-action="WalletPSBTReady">
<input type="hidden" asp-for="PSBT" />
<input type="hidden" asp-for="SigningKey" />
<input type="hidden" asp-for="SigningKeyPath" />
<button type="submit" class="btn btn-primary" name="command" value="broadcast">Broadcast it</button> or
<button type="submit" class="btn btn-secondary" name="command" value="analyze-psbt">Export as PSBT</button>
</form>
</div>
</div>
</div>
</section>