btcpayserver/BTCPayServer/Views/Stores/AddDerivationSchemes_HardwareWalletDialogs.cshtml

127 lines
6.5 KiB
Text

@using NBXplorer.Models
@model DerivationSchemeViewModel
@if (Model.CanUseHotWallet)
{
<partial name="AddDerivationSchemes_NBXWalletGenerate" model="@(new GenerateWalletRequest())"/>
}
<div class="modal fade" id="ledgerimport" tabindex="-1" role="dialog" aria-labelledby="ledgerimport" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content" form method="post">
<div class="modal-header">
<h5 class="modal-title" id="exampleModalLabel">Import Ledger Wallet</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body">
<div id="ledger-loading">
Checking if a ledger wallet is connected...
</div>
<div id="ledger-validate" style="display: none;">
Retrieving, wallet information... you may need to confirm access on your screen.
</div>
<p id="no-ledger-info" style="display: none;">
No ledger wallet detected. If you own one, use chrome, open the app, and refresh this page.
</p>
<div id="no-ledger-info" class="display-when-ledger-connected">
<p>
A ledger wallet is detected, which account do you want to use? No need to paste manually
xpub if your ledger device was detected. Just select derivation scheme from the list
bellow and xpub will automatically populate.
</p>
<p>
<a href="https://docs.btcpayserver.org/getting-started/connectwallet/ledgerwallet#manual-setup"
title="Open Ledger wallet manual setup docs"
target="_blank"
rel="noopener noreferrer">
Can't find your account in the select?
</a>
</p>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
<div class="dropdown display-when-ledger-connected">
<button class="btn btn-primary dropdown-toggle" type="button" id="ledgerAccountsDropdownMenuButton" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
Select ledger wallet account
</button>
<div class="dropdown-menu overflow-auto" style="max-height: 200px;" aria-labelledby="ledgerAccountsDropdownMenuButton">
@for (var i = 0; i < 20; i++)
{
<a class="dropdown-item ledger-info-recommended" data-ledgerkeypath="@Model.RootKeyPath.Derive(i, true)" href="#">Account @i (<span>@Model.RootKeyPath.Derive(i, true)</span>)</a>
}
</div>
</div>
</div>
</div>
</div>
</div>
<div class="modal fade" id="coldcardimport" tabindex="-1" role="dialog" aria-labelledby="coldcardimport" aria-hidden="true">
<div class="modal-dialog" role="document">
<form class="modal-content" form method="post" enctype="multipart/form-data">
<div class="modal-header">
<h5 class="modal-title" id="exampleModalLabel">Import Coldcard Wallet</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body">
<p>You may import your Coldcard wallet by exporting the public details from <kbd>Advanced->MicroSD Card->Electrum Wallet</kbd> and uploading it here.</p>
<div class="form-group">
<label asp-for="ColdcardPublicFile"></label>
<input type="file" class="form-control-file" asp-for="ColdcardPublicFile" required>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
<button type="submit" class="btn btn-primary">Submit</button>
</div>
</form>
</div>
</div>
<template id="btcpayservervault_template">
<div class="modal-dialog" role="document">
<form class="modal-content" form method="post" enctype="multipart/form-data">
<div class="modal-header">
<h5 class="modal-title" id="exampleModalLabel">Import from BTCPayServer Vault</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body">
<p>You may import from BTCPayServer Vault.</p>
<div class="form-group">
<div id="vaultPlaceholder"></div>
</div>
<div id="vault-xpub" style="display:none;">
<div class="form-group">
<label for="addressType">Address type</label>
<select name="addressType" class="form-control">
<option value="segwit">Segwit (Recommended, cheapest transaction fee)</option>
<option value="segwitWrapped">Segwit wrapped (less cheap but compatible with old wallets)</option>
<option value="legacy">Legacy (Not recommended)</option>
</select>
</div>
<div class="form-group">
<label for="accountNumber">Account</label>
<select name="accountNumber" class="form-control">
@for (int i = 0; i < 20; i++)
{
<option value="@i">@i</option>
}
</select>
</div>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
<button id="vault-confirm" class="btn btn-primary" style="display:none;"></button>
</div>
</form>
</div>
</template>