mirror of
https://github.com/aljazceru/btcpayserver.git
synced 2025-12-17 22:14:26 +01:00
Wallet UI: Improve views (#1763)
* Improve UpdateStore and DerivationScheme views fix * Improve wallet views CSS fix * Apply suggestions from code review Co-authored-by: Andrew Camilleri <evilkukka@gmail.com>
This commit is contained in:
@@ -11,6 +11,8 @@ namespace BTCPayServer.Models.StoreViewModels
|
||||
public DerivationSchemeViewModel()
|
||||
{
|
||||
}
|
||||
|
||||
[Display(Name = "Derivation scheme")]
|
||||
public string DerivationScheme
|
||||
{
|
||||
get; set;
|
||||
@@ -31,7 +33,7 @@ namespace BTCPayServer.Models.StoreViewModels
|
||||
|
||||
public KeyPath RootKeyPath { get; set; }
|
||||
|
||||
[Display(Name = "Electrum/Hardware Wallet File")]
|
||||
[Display(Name = "Wallet File")]
|
||||
public IFormFile WalletFile { get; set; }
|
||||
public string Config { get; set; }
|
||||
public string Source { get; set; }
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using NBXplorer.Models;
|
||||
|
||||
@@ -12,11 +13,14 @@ namespace BTCPayServer.Models.WalletViewModels
|
||||
public bool Ok => IsServerAdmin && IsSupportedByCurrency && IsFullySync;
|
||||
|
||||
[Range(1000, 10_000)]
|
||||
[DisplayName("Batch size")]
|
||||
public int BatchSize { get; set; } = 3000;
|
||||
[Range(0, 10_000_000)]
|
||||
[DisplayName("Starting index")]
|
||||
public int StartingIndex { get; set; } = 0;
|
||||
|
||||
[Range(100, 100000)]
|
||||
[DisplayName("Gap limit")]
|
||||
public int GapLimit { get; set; } = 10000;
|
||||
|
||||
public int? Progress { get; set; }
|
||||
|
||||
@@ -26,6 +26,7 @@ namespace BTCPayServer.Models.WalletViewModels
|
||||
_FileName = value;
|
||||
}
|
||||
}
|
||||
[Display(Name = "PSBT content")]
|
||||
public string PSBT { get; set; }
|
||||
public List<string> Errors { get; set; } = new List<string>();
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace BTCPayServer.Models.WalletViewModels
|
||||
@@ -6,6 +7,7 @@ namespace BTCPayServer.Models.WalletViewModels
|
||||
public class WalletSettingsViewModel
|
||||
{
|
||||
public string Label { get; set; }
|
||||
[DisplayName("Derivation scheme")]
|
||||
public string DerivationScheme { get; set; }
|
||||
public string DerivationSchemeInput { get; set; }
|
||||
[Display(Name = "Is signing key")]
|
||||
@@ -20,9 +22,12 @@ namespace BTCPayServer.Models.WalletViewModels
|
||||
|
||||
public class WalletSettingsAccountKeyViewModel
|
||||
{
|
||||
[DisplayName("Account key")]
|
||||
public string AccountKey { get; set; }
|
||||
[DisplayName("Master fingerprint")]
|
||||
[Validation.HDFingerPrintValidator]
|
||||
public string MasterFingerprint { get; set; }
|
||||
[DisplayName("Account key path")]
|
||||
[Validation.KeyPathValidator]
|
||||
public string AccountKeyPath { get; set; }
|
||||
}
|
||||
|
||||
@@ -24,10 +24,10 @@
|
||||
</div>
|
||||
}
|
||||
|
||||
<div class="modal fade" id="btcpayservervault" tabindex="-1" role="dialog" aria-labelledby="btcpayservervault" aria-hidden="true">
|
||||
<div class="modal fade" id="btcpayservervault" tabindex="-1" role="dialog" aria-labelledby="btcpayservervault" aria-hidden="true"></div>
|
||||
|
||||
</div>
|
||||
<partial name="VaultElements" />
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-8">
|
||||
<div id="WebsocketPath" style="display:none;">@Url.Action("VaultBridgeConnection", "Vault", new { cryptoCode = Model.CryptoCode })</div>
|
||||
@@ -72,12 +72,15 @@
|
||||
<input id="DerivationSchemeFormat" asp-for="DerivationSchemeFormat" type="hidden" />
|
||||
<input id="AccountKey" asp-for="AccountKey" type="hidden" />
|
||||
<div class="form-group">
|
||||
<h5>Derivation Scheme</h5>
|
||||
<span>The DerivationScheme represents the destination of the funds received by your invoice. It is generated by your wallet software. Please, verify that you are generating the right addresses by clicking on 'Check ExtPubKey'</span>
|
||||
<h5>Derivation scheme</h5>
|
||||
<p>
|
||||
The derivation scheme represents the destination of the funds received by your invoice.
|
||||
It is generated by your wallet software.
|
||||
</p>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="DerivationScheme"></label>
|
||||
<input asp-for="DerivationScheme" class="form-control store-derivation-scheme" />
|
||||
<textarea asp-for="DerivationScheme" class="form-control store-derivation-scheme text-monospace py-2" rows="2"></textarea>
|
||||
<span asp-validation-for="DerivationScheme" class="text-danger"></span>
|
||||
|
||||
<div class="dropdown mt-2 text-right">
|
||||
@@ -99,8 +102,6 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<span>BTCPay format memo</span>
|
||||
<table class="table table-sm table-responsive-md">
|
||||
<thead>
|
||||
<tr>
|
||||
@@ -135,7 +136,6 @@
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="form-group hw-fields">
|
||||
<h5>Additional pairing information</h5>
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
|
||||
<div class="modal fade" id="electrumimport" tabindex="-1" role="dialog" aria-labelledby="electrumimport" aria-hidden="true">
|
||||
<div class="modal-dialog modal-lg" role="document">
|
||||
<form class="modal-content" form method="post" enctype="multipart/form-data">
|
||||
<form class="modal-content" method="post" enctype="multipart/form-data">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title" id="electrumimportLabel">Import Wallet from file</h5>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
@@ -17,21 +17,43 @@
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<p>You may import your air-gapped hardware wallet (such as ColdCard, Cobo Vault) by exporting a file and uploading it here.</p>
|
||||
<ul >
|
||||
<li>Cobo Vault - <kbd>Settings->Watch-Only Wallet->Wasabi Wallet/BTCPay->Export Wallet</kbd></li>
|
||||
<li>ColdCard - <kbd>Advanced->MicroSD Card->Electrum Wallet</kbd> or <kbd>Advanced->MicroSD Card->Wasabi Wallet</kbd></li>
|
||||
<li>Electrum - <kbd>File->Save Copy</kbd></li>
|
||||
<li>Wasabi - <kbd>Tools->Wallet Manager->Open Wallets Folder</kbd></li>
|
||||
</ul>
|
||||
<p>Import your air-gapped hardware wallet by exporting a file and uploading it here.</p>
|
||||
<table class="table table-sm table-responsive-md">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Wallet</th>
|
||||
<th>Instructions</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>Cobo Vault</td>
|
||||
<td><kbd>Settings ❯ Watch-Only Wallet ❯ BTCPay ❯ Export Wallet</kbd></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>ColdCard</td>
|
||||
<td>
|
||||
<kbd>Advanced ❯ MicroSD Card ❯ Electrum Wallet</kbd> or
|
||||
<kbd>Advanced ❯ MicroSD Card ❯ Wasabi Wallet</kbd>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Electrum</td>
|
||||
<td><kbd>File ❯ Save Copy</kbd></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Wasabi</td>
|
||||
<td><kbd>Tools ❯ Wallet Manager ❯ Open Wallets Folder</kbd></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="form-group">
|
||||
<label asp-for="WalletFile"></label>
|
||||
|
||||
<input type="file" class="form-control-file" asp-for="WalletFile" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">Cancel</button>
|
||||
<button type="submit" class="btn btn-primary">Submit</button>
|
||||
</div>
|
||||
</form>
|
||||
@@ -73,7 +95,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">Cancel</button>
|
||||
<button id="vault-confirm" class="btn btn-primary" style="display:none;"></button>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
@model NBXplorer.Models.GenerateWalletRequest
|
||||
<div class="modal fade" id="nbxplorergeneratewallet" tabindex="-1" role="dialog" aria-labelledby="nbxplorergeneratewallet" aria-hidden="true">
|
||||
<div class="modal-dialog" role="document">
|
||||
<form id="generate-wallet-form" class="modal-content" form method="post" onsubmit="return validatePassphraseConf();"
|
||||
<form id="generate-wallet-form" class="modal-content" method="post" onsubmit="return validatePassphraseConf();"
|
||||
asp-action="GenerateNBXWallet"
|
||||
asp-route-storeId="@this.Context.GetRouteValue("storeId")"
|
||||
asp-route-cryptoCode="@this.Context.GetRouteValue("cryptoCode")"
|
||||
@@ -27,7 +27,8 @@
|
||||
<input type="text" asp-for="ExistingMnemonic" class="form-control" autocomplete="off"/>
|
||||
<span asp-validation-for="ExistingMnemonic" class="text-danger"></span>
|
||||
<small class="form-text text-muted">
|
||||
You can choose to import an existing mnemonic seed phrase. If you leave blank, we will generate one for you.
|
||||
You can choose to import an existing mnemonic seed phrase.<br/>
|
||||
If you leave it blank, we will generate one for you.
|
||||
</small>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
@@ -37,7 +38,7 @@
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="passphrase_conf">Passphrase confirmation</label>
|
||||
<input type="text" name="passphrase_conf" class="form-control"/>
|
||||
<input type="text" name="passphrase_conf" id="passphrase_conf" class="form-control"/>
|
||||
<span class="text-danger field-validation-valid" id="passphrase_conf_validation"></span>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
@@ -60,9 +61,9 @@
|
||||
<span asp-validation-for="AccountNumber" class="text-danger"></span>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<input type="checkbox" class="form-check-inline" asp-for="SavePrivateKeys"/>
|
||||
<label asp-for="SavePrivateKeys">Is hot wallet</label>
|
||||
<div class="form-group form-check">
|
||||
<input type="checkbox" class="form-check-input" asp-for="SavePrivateKeys"/>
|
||||
<label asp-for="SavePrivateKeys" class="form-check-label">Is hot wallet</label>
|
||||
<span asp-validation-for="SavePrivateKeys" class="text-danger"></span>
|
||||
<small class="form-text text-danger">
|
||||
If checked, each private key associated with an address generated will be stored as metadata in NBXplorer. While convenient, this means that anyone with access to your server will have access to your private keys and will be able to steal your funds.
|
||||
@@ -70,9 +71,9 @@
|
||||
</div>
|
||||
@if (ViewData["CanUseRPCImport"] is true)
|
||||
{
|
||||
<div class="form-group">
|
||||
<input type="checkbox" class="form-check-inline" asp-for="ImportKeysToRPC"/>
|
||||
<label asp-for="ImportKeysToRPC">Import keys to RPC</label>
|
||||
<div class="form-group form-check">
|
||||
<input type="checkbox" class="form-check-input" asp-for="ImportKeysToRPC"/>
|
||||
<label asp-for="ImportKeysToRPC" class="form-check-label">Import keys to RPC</label>
|
||||
<span asp-validation-for="ImportKeysToRPC" class="text-danger"></span>
|
||||
<small class="form-text text-muted">
|
||||
If checked, each address generated will be imported into the node wallet so that you can view your balance through your node. When this is enabled alongside <code>Is hot wallet</code>, you're also able to use the node wallet to spend (this works pretty well in conjunction with apps such as FullyNoded).
|
||||
@@ -81,7 +82,7 @@
|
||||
}
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">Cancel</button>
|
||||
<button type="submit" class="btn btn-primary" id="btn-generate">Generate</button>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
@model WalletSendModel
|
||||
|
||||
<div id="coin-selection-app" v-cloak>
|
||||
<ul class="list-group">
|
||||
<ul class="list-group mb-4">
|
||||
<li class="list-group-item list-group-item-heading d-flex justify-content-between align-items-center">
|
||||
<h3>Coin selection</h3>
|
||||
<span class="text-muted text-right" >
|
||||
@@ -57,14 +57,13 @@
|
||||
<a :href="label.link" target="_blank"v-if="label.link" data-toggle="tooltip" v-tooltip="label.tooltip">
|
||||
{{label.value}}
|
||||
<i class="fa fa-info-circle"></i>
|
||||
|
||||
</a>
|
||||
</span>
|
||||
</div>
|
||||
<span class="text-muted ml-2">{{item.amount}}</span>
|
||||
</div>
|
||||
</li>
|
||||
<li class="list-group-item">
|
||||
<li class="list-group-item d-flex align-items-center justify-content-between">
|
||||
<ul class="pagination float-left">
|
||||
<li class="page-item" v-bind:class="{'disabled' : pageStart == 0}">
|
||||
<a class="page-link" tabindex="-1" href="#" v-on:click="page = page -1">«</a>
|
||||
@@ -79,7 +78,7 @@
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<a href="#" v-on:click="showSelectedOnly = !showSelectedOnly" class="btn btn-link" v-bind:class="{'disabled' : selectedInputs.length === 0}">
|
||||
<a href="#" v-on:click="showSelectedOnly = !showSelectedOnly" class="btn btn-secondary" v-bind:class="{'disabled' : selectedInputs.length === 0}">
|
||||
<template v-if="showSelectedOnly">Show all</template>
|
||||
<template v-else>Show selected only</template>
|
||||
</a>
|
||||
@@ -89,7 +88,6 @@
|
||||
|
||||
<script>
|
||||
$(function() {
|
||||
|
||||
Vue.directive('tooltip', function(el, binding) {
|
||||
$(el).tooltip({
|
||||
title: binding.value,
|
||||
|
||||
@@ -47,6 +47,7 @@
|
||||
border: 0;
|
||||
}
|
||||
</style>
|
||||
|
||||
@if (TempData.HasStatusMessage())
|
||||
{
|
||||
<div class="row">
|
||||
@@ -55,6 +56,7 @@
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<form method="post"
|
||||
@@ -65,16 +67,18 @@
|
||||
<input asp-for="Name" class="form-control" />
|
||||
<span asp-validation-for="Name" class="text-danger"></span>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="form-row">
|
||||
<div class="form-group col-8">
|
||||
<label asp-for="Amount" class="control-label"></label>
|
||||
<input asp-for="Amount" class="form-control" />
|
||||
<span asp-validation-for="Amount" class="text-danger"></span>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="form-group col-4">
|
||||
<label asp-for="Currency" class="control-label"></label>
|
||||
<input asp-for="Currency" class="form-control" />
|
||||
<span asp-validation-for="Currency" class="text-danger"></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<input type="submit" value="Create" class="btn btn-primary" id="Create" />
|
||||
</div>
|
||||
|
||||
@@ -26,23 +26,25 @@
|
||||
<form method="post">
|
||||
<div class="row button-row">
|
||||
<div class="col">
|
||||
List of unprocessed payouts
|
||||
<h4 class="mb-3">Payouts to process</h4>
|
||||
</div>
|
||||
@if (Model.WaitingForApproval.Any())
|
||||
{
|
||||
<div class="col text-right">
|
||||
<button type="submit" id="payCommand" name="Command" class="btn btn-primary" role="button" value="pay">Confirm selected payouts</button>
|
||||
<button type="submit" id="payCommand" name="Command" class="btn btn-secondary" role="button" value="cancel">Cancel selected payouts</button>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<h3>Payouts to process</h3>
|
||||
@if (Model.WaitingForApproval.Any())
|
||||
{
|
||||
<table class="table table-sm table-responsive-lg">
|
||||
<thead class="thead-inverse">
|
||||
<tr>
|
||||
<th><input id="selectAllCheckbox" type="checkbox" onclick="selectAll(this); return true;" /></th>
|
||||
<th style="min-width: 90px;" class="col-md-auto">
|
||||
Date
|
||||
</th>
|
||||
<th style="min-width: 90px;" class="col-md-auto">Date</th>
|
||||
<th class="text-left">Source</th>
|
||||
<th class="text-left">Destination</th>
|
||||
<th class="text-right">Amount</th>
|
||||
@@ -65,20 +67,23 @@
|
||||
<td class="text-right"><span>@pp.Amount</span></td>
|
||||
</tr>
|
||||
}
|
||||
@if (Model.WaitingForApproval.Count == 0)
|
||||
{
|
||||
<tr>
|
||||
<td colspan="5" class="text-center"><span>No payout waiting for approval</span></td>
|
||||
</tr>
|
||||
}
|
||||
</tbody>
|
||||
</table>
|
||||
}
|
||||
else
|
||||
{
|
||||
<p class="mb-0">No payout waiting for approval.</p>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr class="my-4"/>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<h3>Completed payouts</h3>
|
||||
<h4 class="mb-3">Completed payouts</h4>
|
||||
@if (Model.Other.Any())
|
||||
{
|
||||
<table class="table table-sm table-responsive-lg">
|
||||
<thead class="thead-inverse">
|
||||
<tr>
|
||||
@@ -110,14 +115,13 @@
|
||||
}
|
||||
</tr>
|
||||
}
|
||||
@if (Model.Other.Count == 0)
|
||||
{
|
||||
<tr>
|
||||
<td colspan="5" class="text-center"><span>No payout in history</span></td>
|
||||
</tr>
|
||||
}
|
||||
</tbody>
|
||||
</table>
|
||||
}
|
||||
else
|
||||
{
|
||||
<p class="mb-0">No payout in history.</p>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
@@ -51,9 +51,11 @@
|
||||
</div>
|
||||
<pre><code class="json">@Model.Decoded</code></pre>
|
||||
}
|
||||
<h3>PSBT to decode</h3>
|
||||
<h4 class="mb-3">Decode PSBT</h4>
|
||||
<p>You can decode a PSBT by either pasting its content or by uploading the file.</p>
|
||||
<form class="form-group" method="post" asp-action="WalletPSBT" asp-route-walletId="@this.Context.GetRouteValue("walletId")" enctype="multipart/form-data">
|
||||
<div class="form-group">
|
||||
<label asp-for="PSBT"></label>
|
||||
<textarea class="form-control" rows="5" asp-for="PSBT"></textarea>
|
||||
<span asp-validation-for="PSBT" class="text-danger"></span>
|
||||
</div>
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
</div>
|
||||
}
|
||||
<div class="row no-gutters">
|
||||
<div class="col-lg-7 mx-auto my-auto ">
|
||||
<div class="col-lg-8 mx-auto my-auto">
|
||||
<form method="post" asp-action="WalletReceive" class="card text-center">
|
||||
<div class="card-body">
|
||||
@if (string.IsNullOrEmpty(Model.Address))
|
||||
@@ -25,7 +25,7 @@
|
||||
}
|
||||
else
|
||||
{
|
||||
<h3 class="card-title mb-4">Next available @Model.CryptoCode address</h3>
|
||||
<h3 class="card-title mb-4">Next available @Model.CryptoCode address</h3>
|
||||
<noscript>
|
||||
<div class="card-body m-sm-0 p-sm-0">
|
||||
<div class="input-group">
|
||||
@@ -34,9 +34,13 @@
|
||||
<span class="input-group-text fa fa-copy"> </span>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<button type="submit" name="command" value="unreserve-current-address" class="btn btn-link">Unreserve this address</button>
|
||||
<button type="submit" name="command" value="generate-new-address" class="btn btn-link">Generate another address</button>
|
||||
<div class="row mt-4">
|
||||
<div class="col-12 col-sm-6">
|
||||
<button type="submit" name="command" value="generate-new-address" class="btn btn-primary w-100">Generate another address</button>
|
||||
</div>
|
||||
<div class="col-12 col-sm-6 mt-4 mt-sm-0">
|
||||
<button type="submit" name="command" value="unreserve-current-address" class="btn btn-secondary w-100">Unreserve this address</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</noscript>
|
||||
@@ -52,9 +56,13 @@
|
||||
<span class="input-group-text fa fa-copy"> </span>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<button type="submit" name="command" value="unreserve-current-address" class="btn btn-link">Unreserve this address</button>
|
||||
<button type="submit" name="command" value="generate-new-address" class="btn btn-link">Generate another address</button>
|
||||
<div class="row mt-4">
|
||||
<div class="col-12 col-sm-6">
|
||||
<button type="submit" name="command" value="generate-new-address" class="btn btn-primary w-100">Generate another address</button>
|
||||
</div>
|
||||
<div class="col-12 col-sm-6 mt-4 mt-sm-0">
|
||||
<button type="submit" name="command" value="unreserve-current-address" class="btn btn-secondary w-100">Unreserve this address</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
|
||||
@@ -5,11 +5,10 @@
|
||||
ViewData.SetActivePageAndTitle(WalletsNavPages.Rescan);
|
||||
}
|
||||
|
||||
|
||||
@if (!Model.Ok)
|
||||
{
|
||||
<div class="row">
|
||||
<div class="col-md-10">
|
||||
<div class="col-lg-8">
|
||||
<p>This feature is disabled</p>
|
||||
@if (Model.IsFullySync)
|
||||
{
|
||||
@@ -55,7 +54,7 @@ else if (!Model.Progress.HasValue)
|
||||
<span>The previous scan completed and found <b>@Model.LastSuccess.Found</b> UTXOs in <b>@Model.TimeOfScan</b> (The total UTXO set size is @Model.LastSuccess.TotalSizeOfUTXOSet.Value)</span>
|
||||
</div>
|
||||
}
|
||||
<div class="col-md-8">
|
||||
<div class="col-lg-8">
|
||||
<p>
|
||||
Scanning the UTXO set allow you to restore the balance of your wallet, but not all the transaction history.
|
||||
</p>
|
||||
@@ -68,19 +67,19 @@ else if (!Model.Progress.HasValue)
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-8">
|
||||
<div class="col-lg-8">
|
||||
<form method="post">
|
||||
<div class="form-group">
|
||||
<label asp-for="StartingIndex"></label>
|
||||
<input asp-for="StartingIndex" class="form-control" type="number" />
|
||||
<input asp-for="StartingIndex" class="form-control" type="number" style="max-width:14ch;" />
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="GapLimit"></label>
|
||||
<input asp-for="GapLimit" class="form-control" type="number" />
|
||||
<input asp-for="GapLimit" class="form-control" type="number" step="1000" style="max-width:14ch;" />
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="BatchSize"></label>
|
||||
<input asp-for="BatchSize" class="form-control" type="number" />
|
||||
<input asp-for="BatchSize" class="form-control" type="number" step="1000" style="max-width:14ch;" />
|
||||
</div>
|
||||
<button type="submit" class="btn btn-primary">Start scan</button>
|
||||
</form>
|
||||
@@ -90,7 +89,7 @@ else if (!Model.Progress.HasValue)
|
||||
else
|
||||
{
|
||||
<div class="row">
|
||||
<div class="col-md-10">
|
||||
<div class="col-lg-8">
|
||||
<p>Scanning in progress, refresh the page to see the progress... (Estimated time: @Model.RemainingTime)</p>
|
||||
<div class="progress">
|
||||
<div class="progress-bar" role="progressbar" aria-valuenow="@(Model.Progress.Value)"
|
||||
|
||||
@@ -16,8 +16,8 @@
|
||||
</div>
|
||||
}
|
||||
<partial name="WalletCameraScanner"/>
|
||||
<div class="row">
|
||||
|
||||
<div class="row">
|
||||
<div class="@(!Model.InputSelection && Model.Outputs.Count==1? "col-lg-7 transaction-output-form": "col-lg-8")">
|
||||
<form method="post" asp-action="WalletSend" asp-route-walletId="@this.Context.GetRouteValue("walletId")">
|
||||
<input type="hidden" asp-for="InputSelection" />
|
||||
@@ -51,7 +51,6 @@
|
||||
</select>
|
||||
</div>
|
||||
<partial name="CoinSelection" />
|
||||
<br>
|
||||
}
|
||||
|
||||
@if (Model.Outputs.Count == 1)
|
||||
@@ -65,12 +64,12 @@
|
||||
<label asp-for="Outputs[0].Amount"></label>
|
||||
<div class="input-group">
|
||||
<input asp-for="Outputs[0].Amount" type="number" step="any" asp-format="{0}" class="form-control output-amount" />
|
||||
<div class="input-group-prepend">
|
||||
<div class="input-group-append">
|
||||
<span class="input-group-text fiat-value" style="display:none;"></span>
|
||||
</div>
|
||||
</div>
|
||||
<span asp-validation-for="Outputs[0].Amount" class="text-danger"></span>
|
||||
<p class="form-text text-muted crypto-info">
|
||||
<p class="form-text text-secondary crypto-info">
|
||||
Your current balance is
|
||||
<button type="button" class="crypto-balance-link btn btn-link p-0 align-baseline">@Model.CurrentBalance</button> <span>@Model.CryptoCode</span>.
|
||||
</p>
|
||||
@@ -79,14 +78,14 @@
|
||||
else
|
||||
{
|
||||
<div class="list-group-item">
|
||||
<h5 class="mb-1">Destinations</h5>
|
||||
<h5 class="mb-0">Destinations</h5>
|
||||
</div>
|
||||
<div class="list-group mb-2">
|
||||
<div class="list-group mb-4">
|
||||
@for (var index = 0; index < Model.Outputs.Count; index++)
|
||||
{
|
||||
<div class="list-group-item transaction-output-form p-0 pl-lg-2">
|
||||
<div class="list-group-item transaction-output-form">
|
||||
<div class="row">
|
||||
<div class="col-sm-12 col-md-12 col-lg-10 py-2 ">
|
||||
<div class="col-sm-12 col-lg-10">
|
||||
<div class="form-group">
|
||||
<label asp-for="Outputs[index].DestinationAddress" class="control-label"></label>
|
||||
<input asp-for="Outputs[index].DestinationAddress" class="form-control" />
|
||||
@@ -96,17 +95,17 @@
|
||||
<label asp-for="Outputs[index].Amount" class="control-label"></label>
|
||||
<div class="input-group">
|
||||
<input asp-for="Outputs[index].Amount" type="number" step="any" asp-format="{0}" class="form-control output-amount" />
|
||||
<div class="input-group-prepend">
|
||||
<div class="input-group-append">
|
||||
<span class="input-group-text fiat-value" style="display:none;"></span>
|
||||
</div>
|
||||
</div>
|
||||
<p class="form-text text-muted crypto-info">
|
||||
<p class="form-text text-secondary crypto-info mb-2">
|
||||
Your current balance is
|
||||
<button type="button" class="crypto-balance-link btn btn-link p-0 align-baseline">@Model.CurrentBalance</button> <span>@Model.CryptoCode</span>.
|
||||
</p>
|
||||
<span asp-validation-for="Outputs[index].Amount" class="text-danger"></span>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="form-group mb-0">
|
||||
<div class="form-check">
|
||||
<input type="checkbox" asp-for="Outputs[index].SubtractFeesFromOutput" class="form-check-input subtract-fees" />
|
||||
<label asp-for="Outputs[index].SubtractFeesFromOutput" class="form-check-label"></label>
|
||||
@@ -114,38 +113,36 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-12 col-md-12 col-lg-2 pull-right">
|
||||
<div class="col-sm-12 col-lg-2">
|
||||
<button type="submit" title="Remove Destination" name="command" value="@($"remove-output:{index}")"
|
||||
class="d-block d-lg-none d-xl-none btn btn-danger mb-2 ml-2">
|
||||
class="d-inline-block d-lg-none d-xl-none btn btn-danger mt-4 mb-2">
|
||||
Remove Destination
|
||||
</button>
|
||||
<button type="submit" title="Remove Destination" name="command" value="@($"remove-output:{index}")"
|
||||
class="d-none d-lg-block remove-destination-btn text-decoration-none h-100 align-middle btn text-danger btn-link fa fa-times rounded-0 pull-right"></button>
|
||||
class="d-none d-lg-inline-block remove-destination-btn btn text-danger fa fa-times pull-right m-0"></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
}
|
||||
<div class="form-group">
|
||||
<div class="form-group my-4">
|
||||
<label asp-for="FeeSatoshiPerByte"></label>
|
||||
<input asp-for="FeeSatoshiPerByte" type="number" step="any" class="form-control" />
|
||||
<input asp-for="FeeSatoshiPerByte" type="number" step="any" class="form-control" style="max-width:14ch;" />
|
||||
<span asp-validation-for="FeeSatoshiPerByte" class="text-danger"></span>
|
||||
<span id="FeeRate-Error" class="text-danger"></span>
|
||||
@if (Model.RecommendedSatoshiPerByte.Any())
|
||||
{
|
||||
<div class="text-left mt-1" >
|
||||
<span class="text-muted">
|
||||
<div class="text-left mt-2 d-flex align-items-center">
|
||||
<span class="text-secondary mr-2">
|
||||
Confirm in the next
|
||||
</span>
|
||||
<div class="btn-group btn-group-toggle feerate-options" data-toggle="buttons">
|
||||
|
||||
<div class="btn-group btn-group-toggle feerate-options" role="group" data-toggle="buttons">
|
||||
@for (var index = 0; index < Model.RecommendedSatoshiPerByte.Count; index++)
|
||||
{
|
||||
var feeRateOption = Model.RecommendedSatoshiPerByte[index];
|
||||
<button type="button" class="btn btn-sm btn-outline-primary crypto-fee-link" value="@feeRateOption.FeeRate" data-toggle="tooltip" title="@feeRateOption.FeeRate sat/b">
|
||||
@feeRateOption.Target.TimeString()
|
||||
|
||||
</button>
|
||||
<input type="hidden" asp-for="RecommendedSatoshiPerByte[index].Target" />
|
||||
<input type="hidden" asp-for="RecommendedSatoshiPerByte[index].FeeRate" />
|
||||
@@ -165,8 +162,8 @@
|
||||
</div>
|
||||
}
|
||||
|
||||
<div class="card">
|
||||
<button id="advancedSettings" class="btn btn-light collapsed" type="button" data-toggle="collapse" data-target="#accordian-advanced" aria-expanded="false" aria-controls="accordian-advanced">
|
||||
<div class="card border-0 my-4">
|
||||
<button id="advancedSettings" class="btn btn-link text-secondary collapsed text-left" type="button" data-toggle="collapse" data-target="#accordian-advanced" aria-expanded="false" aria-controls="accordian-advanced">
|
||||
Advanced settings
|
||||
</button>
|
||||
<div id="accordian-advanced" class="collapse" aria-labelledby="accordian-advanced-header" data-parent="#accordian-advanced">
|
||||
@@ -196,7 +193,7 @@
|
||||
<a href="https://docs.btcpayserver.org/Wallet/#rbf-replace-by-fee" target="_blank">
|
||||
<span class="fa fa-question-circle-o" title="More information..."></span>
|
||||
</a>
|
||||
<select asp-for="AllowFeeBump" class="form-control">
|
||||
<select asp-for="AllowFeeBump" class="form-control w-auto">
|
||||
<option value="Maybe">Randomize for higher privacy</option>
|
||||
<option value="Yes">Yes</option>
|
||||
<option value="No">No</option>
|
||||
@@ -211,17 +208,17 @@
|
||||
<span asp-validation-for="PayJoinBIP21" class="text-danger"></span>
|
||||
</div>
|
||||
}
|
||||
<div class="form-group">
|
||||
<button id="toggleInputSelection" type="submit" name="command" value="toggle-input-selection" class="btn btn-sm btn-secondary">Toggle coin selection</button>
|
||||
<div class="form-group mt-4 mb-0">
|
||||
<button id="toggleInputSelection" type="submit" name="command" value="toggle-input-selection" class="btn btn-secondary">Toggle coin selection</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group d-flex mt-2">
|
||||
<partial name="WalletSigningMenu" model="@((Model.CryptoCode, Model.NBXSeedAvailable))"/>
|
||||
<button type="submit" name="command" value="add-output" class="ml-1 btn btn-secondary">Add another destination</button>
|
||||
<button type="button" id="bip21parse" class="ml-1 btn btn-secondary" title="Paste BIP21/Address"><i class="fa fa-paste"></i></button>
|
||||
<button type="button" id="scanqrcode" class="ml-1 btn btn-secondary only-for-js" data-toggle="modal" data-target="#scanModal" title="Scan BIP21/Address with camera"><i class="fa fa-camera"></i></button>
|
||||
<button type="submit" name="command" value="add-output" class="ml-2 btn btn-secondary">Add another destination</button>
|
||||
<button type="button" id="bip21parse" class="ml-2 btn btn-secondary" title="Paste BIP21/Address"><i class="fa fa-paste"></i></button>
|
||||
<button type="button" id="scanqrcode" class="ml-2 btn btn-secondary only-for-js" data-toggle="modal" data-target="#scanModal" title="Scan BIP21/Address with camera"><i class="fa fa-camera"></i></button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
@@ -231,12 +228,7 @@
|
||||
{
|
||||
<bundle name="wwwroot/bundles/wallet-send-bundle.min.js" asp-append-version="true"></bundle>
|
||||
<style>
|
||||
.remove-destination-btn{
|
||||
font-size: 1.5rem;
|
||||
border-radius: 0;
|
||||
}
|
||||
.remove-destination-btn:hover{
|
||||
background-color: #CCCCCC;
|
||||
}
|
||||
.remove-destination-btn { font-size: 1.5rem; }
|
||||
.remove-destination-btn:hover { border-color: var(--btcpay-color-danger); }
|
||||
</style>
|
||||
}
|
||||
|
||||
@@ -6,22 +6,13 @@
|
||||
}
|
||||
@if (TempData.HasStatusMessage())
|
||||
{
|
||||
<div class="row">
|
||||
<div class="col-md-10 text-center">
|
||||
<partial name="_StatusMessage" />
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
|
||||
<h4 class="mb-3">Additional wallet information</h4>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-10">
|
||||
<p>
|
||||
Additional information about your wallet
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="col-md-8 col-lg-6">
|
||||
<form method="post" asp-action="WalletSettings">
|
||||
<input type="hidden" asp-for="StoreName"/>
|
||||
<input type="hidden" asp-for="UriScheme"/>
|
||||
@@ -45,35 +36,38 @@
|
||||
}
|
||||
@for (int i = 0; i < Model.AccountKeys.Count; i++)
|
||||
{
|
||||
<hr/>
|
||||
<h5>Account key @i</h5>
|
||||
<hr class="my-4"/>
|
||||
|
||||
<h4 class="mb-3">Account key @i</h4>
|
||||
<div class="form-group">
|
||||
<label asp-for="@Model.AccountKeys[i].AccountKey"></label>
|
||||
<input asp-for="@Model.AccountKeys[i].AccountKey" class="form-control" readonly/>
|
||||
<span asp-validation-for="@Model.AccountKeys[i].AccountKey" class="text-danger"></span>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="form-row">
|
||||
<div class="form-group col-auto">
|
||||
<label asp-for="@Model.AccountKeys[i].MasterFingerprint"></label>
|
||||
<input asp-for="@Model.AccountKeys[i].MasterFingerprint" class="form-control"/>
|
||||
<input asp-for="@Model.AccountKeys[i].MasterFingerprint" class="form-control" style="max-width:16ch;"/>
|
||||
<span asp-validation-for="@Model.AccountKeys[i].MasterFingerprint" class="text-danger"></span>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="form-group col-auto">
|
||||
<label asp-for="@Model.AccountKeys[i].AccountKeyPath"></label>
|
||||
<input asp-for="@Model.AccountKeys[i].AccountKeyPath" class="form-control"/>
|
||||
<input asp-for="@Model.AccountKeys[i].AccountKeyPath" class="form-control" style="max-width:16ch;" />
|
||||
<span asp-validation-for="@Model.AccountKeys[i].AccountKeyPath" class="text-danger"></span>
|
||||
</div>
|
||||
</div>
|
||||
@if (Model.IsMultiSig)
|
||||
{
|
||||
<div class="form-group">
|
||||
<label asp-for="SelectedSigningKey"></label>
|
||||
<input asp-for="SelectedSigningKey" type="radio" value="@Model.AccountKeys[i].AccountKey"/>
|
||||
<div class="form-check form-check-inline">
|
||||
<input asp-for="SelectedSigningKey" class="form-check-input" type="radio" value="@Model.AccountKeys[i].AccountKey"/>
|
||||
<label asp-for="SelectedSigningKey" class="form-check-label"></label>
|
||||
</div>
|
||||
}
|
||||
}
|
||||
<div class="form-group d-flex mt-2">
|
||||
<button name="command" type="submit" class="btn btn-primary" value="save">Save</button>
|
||||
<div class="form-group d-flex mt-3">
|
||||
<button name="command" type="submit" class="btn btn-primary mr-2" value="save">Save</button>
|
||||
<div class="dropdown">
|
||||
<button class="ml-1 btn btn-secondary dropdown-toggle" type="button" id="SettingsMenu" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
<button class="btn btn-secondary dropdown-toggle" type="button" id="SettingsMenu" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
Other actions...
|
||||
</button>
|
||||
<div class="dropdown-menu" aria-labelledby="SendMenu">
|
||||
@@ -82,7 +76,6 @@
|
||||
{
|
||||
<button name="command" type="submit" class="dropdown-item" value="view-seed">View seed</button>
|
||||
}
|
||||
|
||||
@if (Model.UriScheme == "bitcoin")
|
||||
{
|
||||
<button type="button" class="dropdown-item register-wallet" data-storename="@Model.StoreName" data-scheme="@Model.UriScheme" data-url="@Url.Action("WalletSend", "Wallets", new {walletId = Context.GetRouteValue("walletId"), bip21 = "%s"})">Open this bitcoin wallet on payment links</button>
|
||||
|
||||
Reference in New Issue
Block a user