btcpayserver/BTCPayServer/Views/UIWallets/SignWithSeed.cshtml

59 lines
2.5 KiB
Text
Raw Normal View History

@using BTCPayServer.Controllers
@model SignWithSeedViewModel
@{
var walletId = Context.GetRouteValue("walletId").ToString();
var cancelUrl = Model.ReturnUrl ?? Url.Action(nameof(UIWalletsController.WalletTransactions), new { walletId });
var backUrl = Model.BackUrl != null ? $"{Model.BackUrl}?returnUrl={Model.ReturnUrl}" : null;
2021-07-29 15:53:10 +02:00
Layout = "_LayoutWizard";
ViewData.SetActivePage(WalletsNavPages.Send, StringLocalizer["Sign PSBT"], walletId);
}
2021-07-29 15:53:10 +02:00
@section Navbar {
@if (backUrl != null)
{
<a href="@Url.EnsureLocal(backUrl, Context.Request)" id="GoBack">
<vc:icon symbol="back" />
</a>
}
<a href="@Url.EnsureLocal(cancelUrl, Context.Request)" id="CancelWizard" class="cancel">
2021-07-29 15:53:10 +02:00
<vc:icon symbol="close" />
</a>
}
2021-07-29 15:53:10 +02:00
<header class="text-center">
<h1>@ViewData["Title"]</h1>
<p class="lead text-secondary mt-3" text-translate="true">Using an HD private key or mnemonic seed</p>
2021-07-29 15:53:10 +02:00
</header>
2021-07-29 15:53:10 +02:00
<div class="alert alert-warning alert-dismissible my-4" role="alert">
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="@StringLocalizer["Close"]">
2021-07-29 15:53:10 +02:00
<vc:icon symbol="close" />
</button>
<p text-translate="true">Before you proceed, please understand the following:</p>
2021-07-29 15:53:10 +02:00
<ol>
<li text-translate="true">Make sure this BTCPay Server instance belongs to you.</li>
<li text-translate="true">Use Incognito mode or the Tor Browser to ensure no malicious browser plugins are running that could steal your key.</li>
2021-07-29 15:53:10 +02:00
</ol>
<p class="mb-0" text-translate="true">Otherwise you are exposing yourself to malicious site owners, or to malicious plugins installed in your browser.</p>
</div>
2021-07-29 15:53:10 +02:00
@if (!ViewContext.ModelState.IsValid)
{
<div asp-validation-summary="All"></div>
}
2021-07-29 15:53:10 +02:00
<form method="post" asp-action="SignWithSeed" asp-route-walletId="@walletId">
2021-07-29 15:53:10 +02:00
<partial name="SigningContext" for="SigningContext"/>
<input type="hidden" asp-for="ReturnUrl" />
<input type="hidden" asp-for="BackUrl" />
2021-07-29 15:53:10 +02:00
<div class="form-group">
<label asp-for="SeedOrKey" class="form-label"></label>
<input asp-for="SeedOrKey" class="form-control" autocomplete="off" autocorrect="off" autocapitalize="off"/>
</div>
<div class="form-group">
<label asp-for="Passphrase" class="form-label"></label>
<input asp-for="Passphrase" class="form-control"/>
</div>
<button id="Submit" type="submit" class="btn btn-primary" text-translate="true">Sign</button>
2021-07-29 15:53:10 +02:00
</form>