2021-07-27 17:01:00 +02:00
|
|
|
@model WalletPSBTViewModel
|
|
|
|
@addTagHelper *, BundlerMinifier.TagHelpers
|
|
|
|
@{
|
2021-07-30 18:54:17 +02:00
|
|
|
var isReady = !Model.HasErrors;
|
2021-07-27 17:01:00 +02:00
|
|
|
Layout = "_LayoutWizard";
|
2021-07-30 18:54:17 +02:00
|
|
|
ViewData.SetActivePageAndTitle(WalletsNavPages.PSBT, isReady ? "Transaction Broadcasting" : "Transaction Details", Context.GetStoreData().StoreName);
|
2021-07-27 17:01:00 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
@section Navbar {
|
|
|
|
<a asp-action="WalletPSBT" asp-route-walletId="@Context.GetRouteValue("walletId")" onclick="history.back();return false;">
|
|
|
|
<vc:icon symbol="back" />
|
|
|
|
</a>
|
|
|
|
<a asp-action="WalletSend" asp-route-walletId="@Context.GetRouteValue("walletId")" class="cancel">
|
|
|
|
<vc:icon symbol="close" />
|
|
|
|
</a>
|
|
|
|
}
|
|
|
|
|
2021-07-30 18:54:17 +02:00
|
|
|
<header class="text-center mb-3">
|
2021-07-27 17:01:00 +02:00
|
|
|
<h1>@ViewData["PageTitle"]</h1>
|
|
|
|
</header>
|
|
|
|
|
|
|
|
<partial name="_PSBTInfo" model="Model" />
|
|
|
|
|
2021-07-30 18:54:17 +02:00
|
|
|
@if (!isReady)
|
2021-07-29 17:13:46 +02:00
|
|
|
{
|
2021-07-30 18:54:17 +02:00
|
|
|
<form method="post" asp-action="WalletPSBT" asp-route-walletId="@Context.GetRouteValue("walletId")" class="mt-5">
|
2021-07-27 17:01:00 +02:00
|
|
|
<input type="hidden" asp-for="CryptoCode"/>
|
|
|
|
<input type="hidden" asp-for="NBXSeedAvailable"/>
|
|
|
|
<input type="hidden" asp-for="PSBT"/>
|
|
|
|
<input type="hidden" asp-for="FileName"/>
|
2021-07-30 18:54:17 +02:00
|
|
|
<div class="d-flex align-items-center justify-content-center">
|
2021-07-27 17:01:00 +02:00
|
|
|
<button type="submit" id="SignTransaction" name="command" value="@(Model.NBXSeedAvailable ? "nbx-seed" : "sign")" class="btn btn-primary me-2">Sign transaction</button>
|
2021-07-30 18:54:17 +02:00
|
|
|
<button type="submit" name="command" value="update" class="btn btn-secondary me-2">Update PSBT</button>
|
|
|
|
<button type="submit" name="command" value="combine" class="btn btn-secondary">Combine PSBT</button>
|
2021-07-27 17:01:00 +02:00
|
|
|
</div>
|
|
|
|
</form>
|
2021-07-29 17:13:46 +02:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2021-07-30 18:54:17 +02:00
|
|
|
<form method="post" asp-action="WalletPSBTReady" asp-route-walletId="@Context.GetRouteValue("walletId")" class="mt-5">
|
2021-07-29 17:13:46 +02:00
|
|
|
<input type="hidden" asp-for="SigningKey" />
|
|
|
|
<input type="hidden" asp-for="SigningKeyPath" />
|
|
|
|
<partial name="SigningContext" for="SigningContext" />
|
2021-07-30 18:54:17 +02:00
|
|
|
<div class="d-flex align-items-center justify-content-center">
|
2021-07-29 17:13:46 +02:00
|
|
|
@if (!string.IsNullOrEmpty(Model.SigningContext?.PayJoinBIP21))
|
|
|
|
{
|
|
|
|
<button type="submit" class="btn btn-primary" name="command" value="payjoin">Broadcast (Payjoin)</button>
|
|
|
|
<span class="mx-2">or</span>
|
|
|
|
<button type="submit" class="btn btn-secondary" name="command" value="broadcast">Broadcast (Simple)</button>
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2021-07-30 18:54:17 +02:00
|
|
|
<button type="submit" class="btn btn-primary" name="command" value="broadcast">Broadcast transaction</button>
|
2021-07-29 17:13:46 +02:00
|
|
|
}
|
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
}
|