2019-05-21 10:10:07 +02:00
|
|
|
@using Microsoft.AspNetCore.Mvc.ModelBinding
|
|
|
|
@model WalletSendModel
|
2018-02-12 19:27:36 +01:00
|
|
|
@{
|
|
|
|
Layout = "../Shared/_NavLayout.cshtml";
|
|
|
|
ViewData["Title"] = "Manage wallet";
|
2018-07-26 15:32:24 +02:00
|
|
|
ViewData.SetActivePageAndTitle(WalletsNavPages.Send);
|
2018-02-12 19:27:36 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
<h4>@ViewData["Title"]</h4>
|
2018-10-31 16:19:25 +01:00
|
|
|
|
2019-05-21 10:10:07 +02:00
|
|
|
<div class="row no-gutters">
|
2019-05-21 11:44:49 +02:00
|
|
|
<div class="@(Model.Outputs.Count==1? "col-lg-6 transaction-output-form": "col-lg-8")">
|
2018-10-31 16:19:25 +01:00
|
|
|
<form method="post">
|
2019-05-21 11:44:49 +02:00
|
|
|
<input type="hidden" asp-for="Divisibility" />
|
|
|
|
<input type="hidden" asp-for="Fiat" />
|
|
|
|
<input type="hidden" asp-for="Rate" />
|
|
|
|
<input type="hidden" asp-for="CurrentBalance" />
|
|
|
|
<input type="hidden" asp-for="RecommendedSatoshiPerByte" />
|
|
|
|
<input type="hidden" asp-for="CryptoCode" />
|
2019-05-21 10:10:07 +02:00
|
|
|
<ul class="text-danger">
|
|
|
|
@foreach (var errors in ViewData.ModelState.Where(pair => pair.Key == string.Empty && pair.Value.ValidationState == ModelValidationState.Invalid))
|
|
|
|
{
|
2019-05-21 11:44:49 +02:00
|
|
|
foreach (var error in
|
2019-05-21 10:10:07 +02:00
|
|
|
errors.Value.Errors)
|
|
|
|
{
|
|
|
|
<li>@error.ErrorMessage</li>
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</ul>
|
2019-05-21 11:44:49 +02:00
|
|
|
@if (Model.Outputs.Count == 1)
|
|
|
|
{
|
|
|
|
<div class="form-group">
|
|
|
|
<label asp-for="Outputs[0].DestinationAddress"></label>
|
|
|
|
<input asp-for="Outputs[0].DestinationAddress" class="form-control" />
|
|
|
|
<span asp-validation-for="Outputs[0].DestinationAddress" class="text-danger"></span>
|
|
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
|
|
<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">
|
|
|
|
<span class="input-group-text text-muted" style="display:none;" id="fiatValue"></span>
|
|
|
|
</div>
|
2019-05-21 10:10:07 +02:00
|
|
|
</div>
|
2019-05-21 11:44:49 +02:00
|
|
|
<span asp-validation-for="Outputs[0].Amount" class="text-danger"></span>
|
|
|
|
<p class="form-text text-muted crypto-info">
|
|
|
|
Your current balance is
|
|
|
|
<button type="button" class="crypto-balance-link btn btn-link p-0">@Model.CurrentBalance</button> <span>@Model.CryptoCode</span>.
|
|
|
|
</p>
|
|
|
|
</div>
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
<div class="list-group-item ">
|
|
|
|
<h5 class="mb-1">Destinations</h5>
|
|
|
|
</div>
|
|
|
|
<div class="list-group mb-2">
|
|
|
|
@for (var index = 0; index < Model.Outputs.Count; index++)
|
|
|
|
{
|
|
|
|
<div class="list-group-item transaction-output-form p-0 pl-lg-2">
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-sm-12 col-md-12 col-lg-10 py-2 ">
|
|
|
|
<div class="form-group">
|
|
|
|
<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">
|
|
|
|
<span class="input-group-text text-muted fiat-value" style="display:none;"></span>
|
|
|
|
</div>
|
2019-05-21 10:10:07 +02:00
|
|
|
</div>
|
2019-05-21 11:44:49 +02:00
|
|
|
<p class="form-text text-muted crypto-info">
|
|
|
|
Your current balance is
|
|
|
|
<button type="button" class="crypto-balance-link btn btn-link p-0">@Model.CurrentBalance</button> <span>@Model.CryptoCode</span>.
|
|
|
|
</p>
|
|
|
|
<span asp-validation-for="Outputs[index].Amount" class="text-danger"></span>
|
|
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
|
|
<label asp-for="Outputs[index].DestinationAddress" class="control-label"></label>
|
|
|
|
<input asp-for="Outputs[index].DestinationAddress" class="form-control" />
|
|
|
|
<span asp-validation-for="Outputs[index].DestinationAddress" class="text-danger"></span>
|
|
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
|
|
<label asp-for="Outputs[index].SubtractFeesFromOutput" class="control-label"></label>
|
|
|
|
<input type="checkbox" asp-for="Outputs[index].SubtractFeesFromOutput" class="form-check subtract-fees" />
|
|
|
|
<span asp-validation-for="Outputs[index].SubtractFeesFromOutput" class="text-danger"></span>
|
2019-05-21 10:10:07 +02:00
|
|
|
</div>
|
|
|
|
</div>
|
2019-05-21 11:44:49 +02:00
|
|
|
<div class="col-sm-12 col-md-12 col-lg-2 pull-right">
|
2019-05-21 10:10:07 +02:00
|
|
|
<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">
|
|
|
|
Remove Destination
|
|
|
|
</button>
|
|
|
|
<button type="submit" title="Remove Destination" name="command" value="@($"remove-output:{index}")"
|
2019-05-21 11:44:49 +02:00
|
|
|
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>
|
|
|
|
</div>
|
2019-05-21 10:10:07 +02:00
|
|
|
</div>
|
|
|
|
</div>
|
2019-05-21 11:44:49 +02:00
|
|
|
}
|
|
|
|
</div>
|
|
|
|
}
|
2018-03-23 08:24:57 +01:00
|
|
|
<div class="form-group">
|
2018-10-31 16:19:25 +01:00
|
|
|
<label asp-for="FeeSatoshiPerByte"></label>
|
2019-05-21 11:44:49 +02:00
|
|
|
<input asp-for="FeeSatoshiPerByte" type="number" step="any" class="form-control" />
|
2018-03-23 08:24:57 +01:00
|
|
|
<span id="FeeRate-Error" class="text-danger"></span>
|
2018-10-31 16:19:25 +01:00
|
|
|
<p class="form-text text-muted crypto-info">
|
2019-05-21 10:10:07 +02:00
|
|
|
The recommended value is
|
|
|
|
<button type="button" id="crypto-fee-link" class="btn btn-link p-0">@Model.RecommendedSatoshiPerByte</button> satoshi per byte.
|
2018-03-23 08:24:57 +01:00
|
|
|
</p>
|
|
|
|
</div>
|
2019-05-21 11:44:49 +02:00
|
|
|
@if (Model.Outputs.Count == 1)
|
|
|
|
{
|
|
|
|
<div class="form-group">
|
|
|
|
<label asp-for="Outputs[0].SubtractFeesFromOutput" class="control-label"></label>
|
|
|
|
<input type="checkbox" asp-for="Outputs[0].SubtractFeesFromOutput" class="form-check subtract-fees" />
|
|
|
|
<span asp-validation-for="Outputs[0].SubtractFeesFromOutput" class="text-danger"></span>
|
|
|
|
</div>
|
|
|
|
}
|
2019-05-08 05:34:33 +02:00
|
|
|
<div class="card">
|
|
|
|
<div class="card-header" id="accordian-dev-info-notification-header">
|
|
|
|
<h2 class="mb-0">
|
|
|
|
<button class="btn btn-link collapsed" type="button" data-toggle="collapse" data-target="#accordian-advanced" aria-expanded="false" aria-controls="accordian-advanced">
|
|
|
|
Advanced settings
|
|
|
|
</button>
|
|
|
|
</h2>
|
|
|
|
</div>
|
|
|
|
<div id="accordian-advanced" class="collapse" aria-labelledby="accordian-advanced-header" data-parent="#accordian-advanced">
|
|
|
|
<div class="card-body">
|
|
|
|
<div class="form-group">
|
|
|
|
<label asp-for="NoChange"></label>
|
2019-05-21 10:10:07 +02:00
|
|
|
<a href="https://docs.btcpayserver.org/features/wallet#make-sure-no-change-utxo-is-created-expert-mode" target="_blank">
|
|
|
|
<span class="fa fa-question-circle-o" title="More information..."></span>
|
|
|
|
</a>
|
2019-05-21 11:44:49 +02:00
|
|
|
<input asp-for="NoChange" class="form-check" />
|
2019-05-08 05:34:33 +02:00
|
|
|
</div>
|
2019-05-08 08:24:20 +02:00
|
|
|
@if (Model.SupportRBF)
|
|
|
|
{
|
2019-05-21 10:10:07 +02:00
|
|
|
<div class="form-group">
|
|
|
|
<label asp-for="DisableRBF"></label>
|
|
|
|
<a href="https://bitcoin.org/en/glossary/rbf" target="_blank">
|
|
|
|
<span class="fa fa-question-circle-o" title="More information..."></span>
|
|
|
|
</a>
|
2019-05-21 11:44:49 +02:00
|
|
|
<input asp-for="DisableRBF" class="form-check" />
|
2019-05-21 10:10:07 +02:00
|
|
|
</div>
|
2019-05-08 08:24:20 +02:00
|
|
|
}
|
2019-05-08 05:34:33 +02:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2019-05-21 10:10:07 +02:00
|
|
|
<div class="form-group d-flex mt-2">
|
|
|
|
<div class="dropdown">
|
2019-05-08 07:39:37 +02:00
|
|
|
<button class="btn btn-primary dropdown-toggle" type="button" id="SendMenu" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
|
|
|
Sign with...
|
|
|
|
</button>
|
|
|
|
<div class="dropdown-menu" aria-labelledby="SendMenu">
|
|
|
|
<button name="command" type="submit" class="dropdown-item" value="ledger">... your Ledger Wallet device</button>
|
2019-05-14 18:03:48 +02:00
|
|
|
<button name="command" type="submit" class="dropdown-item" value="seed">... an HD private key or mnemonic seed</button>
|
2019-05-13 01:55:26 +02:00
|
|
|
<button name="command" type="submit" class="dropdown-item" value="analyze-psbt">... a wallet supporting PSBT</button>
|
2019-05-08 07:39:37 +02:00
|
|
|
</div>
|
|
|
|
</div>
|
2019-05-21 10:10:07 +02:00
|
|
|
<button type="submit" name="command" value="add-output" class="ml-1 btn btn-secondary">Add another destination </button>
|
2019-01-15 15:50:45 +01:00
|
|
|
</div>
|
2018-03-23 08:24:57 +01:00
|
|
|
</form>
|
|
|
|
</div>
|
2018-02-12 19:27:36 +01:00
|
|
|
</div>
|
2019-05-21 10:10:07 +02:00
|
|
|
|
2018-07-26 16:23:28 +02:00
|
|
|
@section Scripts
|
2018-10-31 16:19:25 +01:00
|
|
|
{
|
|
|
|
<script src="~/js/WalletSend.js" type="text/javascript" defer="defer"></script>
|
2019-05-21 10:10:07 +02:00
|
|
|
<style>
|
|
|
|
.remove-destination-btn{
|
|
|
|
font-size: 1.5rem;
|
|
|
|
border-radius: 0;
|
|
|
|
}
|
|
|
|
.remove-destination-btn:hover{
|
|
|
|
background-color: #CCCCCC;
|
|
|
|
}
|
|
|
|
</style>
|
2018-07-26 16:23:28 +02:00
|
|
|
}
|