mirror of
https://github.com/aljazceru/btcpayserver.git
synced 2026-01-02 05:34:22 +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>
59 lines
2.4 KiB
Plaintext
59 lines
2.4 KiB
Plaintext
@model WalletSendVaultModel
|
|
@{
|
|
Layout = "../Shared/_NavLayout.cshtml";
|
|
ViewData.SetActivePageAndTitle(WalletsNavPages.Send, "Sign the transaction with BTCPay Server Vault", Context.GetStoreData().StoreName);
|
|
}
|
|
|
|
<h2 class="mb-4">@ViewData["PageTitle"]</h2>
|
|
|
|
<div id="walletAlert" class="alert alert-danger alert-dismissible" style="display:none;" role="alert">
|
|
<button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">×</span></button>
|
|
<span id="alertMessage"></span>
|
|
</div>
|
|
<div class="row">
|
|
<div id="body" class="col-md-10">
|
|
<form id="broadcastForm" asp-action="WalletSendVault" asp-route-walletId="@this.Context.GetRouteValue("walletId")" method="post" style="display:none;">
|
|
<input type="hidden" id="WalletId" asp-for="WalletId" />
|
|
<input type="hidden" asp-for="WebsocketPath" />
|
|
<partial name="SigningContext" for="SigningContext" />
|
|
</form>
|
|
<div id="vaultPlaceholder"></div>
|
|
<button id="vault-retry" class="btn btn-primary" style="display:none;" type="button">Retry</button>
|
|
<button id="vault-confirm" class="btn btn-primary" style="display:none;"></button>
|
|
</div>
|
|
</div>
|
|
|
|
<partial name="VaultElements" />
|
|
@section Scripts
|
|
{
|
|
<script src="~/js/vaultbridge.js" type="text/javascript" defer="defer" asp-append-version="true"></script>
|
|
<script src="~/js/vaultbridge.ui.js" type="text/javascript" defer="defer" asp-append-version="true"></script>
|
|
<script type="text/javascript">
|
|
async function askSign() {
|
|
var websocketPath = $("#WebsocketPath").val();
|
|
var loc = window.location, ws_uri;
|
|
if (loc.protocol === "https:") {
|
|
ws_uri = "wss:";
|
|
} else {
|
|
ws_uri = "ws:";
|
|
}
|
|
ws_uri += "//" + loc.host;
|
|
ws_uri += websocketPath;
|
|
var html = $("#VaultConnection").html();
|
|
$("#vaultPlaceholder").html(html);
|
|
var vaultUI = new vaultui.VaultBridgeUI(ws_uri);
|
|
|
|
while (!await vaultUI.askForDevice() || !await vaultUI.askSignPSBT({
|
|
walletId: $("#WalletId").val(),
|
|
psbt: $("#SigningContext_PSBT").val()
|
|
})) {
|
|
}
|
|
$("#SigningContext_PSBT").val(vaultUI.psbt);
|
|
$("#broadcastForm").submit();
|
|
}
|
|
$(function () {
|
|
askSign();
|
|
});
|
|
</script>
|
|
}
|