btcpayserver/BTCPayServer/Views/Wallets/WalletPSBTReady.cshtml

159 lines
6.5 KiB
Text
Raw Normal View History

@model WalletPSBTReadyViewModel
@{
Layout = "../Shared/_Layout.cshtml";
ViewData.SetActivePageAndTitle(WalletsNavPages.PSBT, "Review PSBT", Context.GetStoreData().StoreName);
}
<section>
<div class="container">
<div class="row">
2019-12-03 14:30:29 +09:00
<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">
Bootstrap v5 migration (#2490) * Swap bootstrap asset files * Update themes and color definitions * Move general bootstrap customizations * Theme updates Theme updates * Remove BuildBundlerMinifier This lead to an error, because BuildBundlerMinifier and BundlerMinifier.Core seem to conflict here. Details: https://stackoverflow.com/a/61119586 * Rewplace btn-block class with w-100 * Update badge classes * Remove old font family head variable * Update margin classes * Cleanups * Update float classes * Update text classes * Update padding classes * Update border classes * UPdate dropdown classes * Update select classes * Update neutral custom props * Update bootstrap and customizations * Update ChromeDriver; disable smooth scroll https://github.com/SeleniumHQ/selenium/issues/8295 * Improve alert messages * Improve bootstrap customizations * Disable reduced motion See also 7358282f * Update Bootstrap data attributes * Update file inputs * Update input groups * Replace deprecated jumbotron class * Update variables; re-add negative margin util classes * Update cards * Update form labels * Debug alerts * Fix aria-labelledby associations * Dropdown-related test fixes * Fix CanUseWebhooks test * Test fixes * Nav updates * Fix nav usage in wallet send and payouts * Update alert and modal close buttons * Re-add backdrop properties * Upgrade Bootstrap to v5 final * Update screen reader classes * Update font-weight classes * Update monospace font classes * Update accordians * Update close icon usage * Cleanup * Update scripts and style integrations * Update input group texts * Update LN node setup page * Update more form control classes * Update inline forms * Add js specific test * Upgrade Vue.js * Remove unused JS * Upgrade Bootstrap to v5.0.1 * Try container related test updates * Separate jQuery bundle * Remove jQuery from LND seed backup page * Remove unused code * Refactor email autofill js * Refactor camera scanner JS * Re-add tests * Re-add BuildBundlerMinifier * Do not minify bundles containing Bootstrap Details https://github.com/madskristensen/BundlerMinifier/issues/558 * Update bundles * Cleanup JS test * Cleanup tests involving dropdowns * Cleanup tests involving collapses * Cleanup locale additions in ConfigureCore * Cleanup bundles * Remove duplicate status message * Cleanup formatting * Fix missing validation scripts * Remove unused unminified Bootstrap js files * Fix classic theme * Fix Casa theme * Fix PoS validation
2021-05-19 04:39:27 +02:00
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close">
<vc:icon symbol="close" />
</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>
Bootstrap v5 migration (#2490) * Swap bootstrap asset files * Update themes and color definitions * Move general bootstrap customizations * Theme updates Theme updates * Remove BuildBundlerMinifier This lead to an error, because BuildBundlerMinifier and BundlerMinifier.Core seem to conflict here. Details: https://stackoverflow.com/a/61119586 * Rewplace btn-block class with w-100 * Update badge classes * Remove old font family head variable * Update margin classes * Cleanups * Update float classes * Update text classes * Update padding classes * Update border classes * UPdate dropdown classes * Update select classes * Update neutral custom props * Update bootstrap and customizations * Update ChromeDriver; disable smooth scroll https://github.com/SeleniumHQ/selenium/issues/8295 * Improve alert messages * Improve bootstrap customizations * Disable reduced motion See also 7358282f * Update Bootstrap data attributes * Update file inputs * Update input groups * Replace deprecated jumbotron class * Update variables; re-add negative margin util classes * Update cards * Update form labels * Debug alerts * Fix aria-labelledby associations * Dropdown-related test fixes * Fix CanUseWebhooks test * Test fixes * Nav updates * Fix nav usage in wallet send and payouts * Update alert and modal close buttons * Re-add backdrop properties * Upgrade Bootstrap to v5 final * Update screen reader classes * Update font-weight classes * Update monospace font classes * Update accordians * Update close icon usage * Cleanup * Update scripts and style integrations * Update input group texts * Update LN node setup page * Update more form control classes * Update inline forms * Add js specific test * Upgrade Vue.js * Remove unused JS * Upgrade Bootstrap to v5.0.1 * Try container related test updates * Separate jQuery bundle * Remove jQuery from LND seed backup page * Remove unused code * Refactor email autofill js * Refactor camera scanner JS * Re-add tests * Re-add BuildBundlerMinifier * Do not minify bundles containing Bootstrap Details https://github.com/madskristensen/BundlerMinifier/issues/558 * Update bundles * Cleanup JS test * Cleanup tests involving dropdowns * Cleanup tests involving collapses * Cleanup locale additions in ConfigureCore * Cleanup bundles * Remove duplicate status message * Cleanup formatting * Fix missing validation scripts * Remove unused unminified Bootstrap js files * Fix classic theme * Fix Casa theme * Fix PoS validation
2021-05-19 04:39:27 +02:00
<div class="col-lg-6 text-end">
<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)
{
2020-06-17 21:43:56 +09:00
@if (!string.IsNullOrEmpty(Model.SigningContext?.PayJoinBIP21))
2020-03-31 14:57:24 +02:00
{
<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>
}
2020-09-09 10:05:12 +02:00
<button type="submit" class="btn btn-secondary" name="command" value="analyze-psbt">View PSBT</button>
</form>
</div>
</div>
</div>
</section>