Files
btcpayserver/BTCPayServer/Views/Server/LndSeedBackup.cshtml
2019-11-10 06:12:32 -06:00

68 lines
2.3 KiB
Plaintext

@model LndSeedBackupViewModel
@{
ViewData.SetActivePageAndTitle(ServerNavPages.Services);
}
<h4>LND Seed Backup</h4>
<partial name="_StatusMessage" />
<div class="row">
<div class="col-md-6">
<div asp-validation-summary="All" class="text-danger"></div>
</div>
</div>
<div class="row">
<div class="col-md-8">
<div class="form-group">
@if (Model.IsWalletUnlockPresent)
{
<p>Wallet Password: <b>@Model.WalletPassword</b></p>
@if (Model.Seed.Count > 1)
{
<p>
<div><a href="#details" data-toggle="collapse">Reveal Seed Information</a></div>
<div id="details" class="collapse">
@foreach (var item in Model.Seed)
{
<span>@item</span>
}
<br /><br />
<form method="post" action="@Context.Request.Path/removelndseed">
<button class="btn btn-primary" type="submit" onclick="return confirmSeedDelete();">Remove Seed from server</button>
</form>
</div>
</p>
}
else
{
<p><b>@Model.Seed.First()</b></p>
}
}
else
{
<p class="text-danger">Unlock file is NOT present</p>
<p>You have old version of LND deployment that was auto-initialized using `noseedbackup=1`.</p>
<p>Please migrate to new version of LND deployment that is auto-initialized through script which creates seed backup file as part of the startup process.</p>
<p><a href="https://github.com/btcpayserver/lnd/pull/4" target="_blank">Visit this link for more information</a></p>
}
</div>
</div>
</div>
@section Scripts {
<script type="text/javascript">
function confirmSeedDelete() {
var conf = confirm('This operation is not undoable. Are you sure you want to proceed with deleting seed from LND container?');
if (conf) {
return true;
}
else {
return false;
}
}
</script>
}