2020-03-26 11:59:28 +01:00
|
|
|
@addTagHelper *, BundlerMinifier.TagHelpers
|
|
|
|
@using Microsoft.AspNetCore.Mvc.ModelBinding
|
2020-05-07 22:34:39 +02:00
|
|
|
@using BTCPayServer.Views
|
2019-05-21 10:10:07 +02:00
|
|
|
@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
|
|
|
}
|
2020-02-13 09:18:43 +01:00
|
|
|
@if (TempData.HasStatusMessage())
|
|
|
|
{
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-md-10 text-center">
|
|
|
|
<partial name="_StatusMessage" />
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
}
|
2020-03-26 11:59:28 +01:00
|
|
|
<partial name="WalletCameraScanner"/>
|
2019-11-01 22:15:02 +01:00
|
|
|
<div class="row">
|
2020-03-26 11:59:28 +01:00
|
|
|
|
2020-03-19 09:44:47 +01:00
|
|
|
<div class="@(!Model.InputSelection && Model.Outputs.Count==1? "col-lg-6 transaction-output-form": "col-lg-8")">
|
2018-10-31 16:19:25 +01:00
|
|
|
<form method="post">
|
2020-03-19 09:44:47 +01:00
|
|
|
<input type="hidden" asp-for="InputSelection" />
|
2019-05-21 11:44:49 +02:00
|
|
|
<input type="hidden" asp-for="Divisibility" />
|
2020-01-21 09:33:12 +01:00
|
|
|
<input type="hidden" asp-for="NBXSeedAvailable" />
|
2019-05-21 11:44:49 +02:00
|
|
|
<input type="hidden" asp-for="Fiat" />
|
|
|
|
<input type="hidden" asp-for="Rate" />
|
|
|
|
<input type="hidden" asp-for="CurrentBalance" />
|
|
|
|
<input type="hidden" asp-for="CryptoCode" />
|
2020-02-13 09:18:43 +01:00
|
|
|
<input type="hidden" name="BIP21" id="BIP21" />
|
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>
|
2020-05-05 12:06:59 +02:00
|
|
|
|
2020-03-19 09:44:47 +01:00
|
|
|
@if (Model.InputSelection)
|
|
|
|
{
|
2020-03-19 10:08:33 +01:00
|
|
|
<div class="form-group hide-when-js">
|
|
|
|
<label asp-for="SelectedInputs"></label>
|
2020-04-08 13:15:03 +02:00
|
|
|
<select multiple="multiple" asp-for="SelectedInputs" class="form-control">
|
2020-03-19 10:08:33 +01:00
|
|
|
@foreach (var input in Model.InputsAvailable)
|
|
|
|
{
|
2020-04-08 13:15:03 +02:00
|
|
|
<option value="@input.Outpoint" class="text-truncate" asp-selected="@(Model.SelectedInputs?.Contains(input.Outpoint)??false)">(@input.Amount) @input.Outpoint</option>
|
2020-03-19 10:08:33 +01:00
|
|
|
}
|
|
|
|
</select>
|
|
|
|
</div>
|
2020-05-05 12:06:59 +02:00
|
|
|
<partial name="CoinSelection" />
|
2020-04-07 18:12:15 +02:00
|
|
|
<br>
|
2020-03-19 09:44:47 +01:00
|
|
|
}
|
2020-05-05 12:06:59 +02:00
|
|
|
|
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">
|
2019-11-08 22:31:21 +01:00
|
|
|
<span class="input-group-text fiat-value" style="display:none;"></span>
|
2019-05-21 11:44:49 +02:00
|
|
|
</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
|
2020-04-07 18:12:15 +02:00
|
|
|
<button type="button" class="crypto-balance-link btn btn-link p-0 align-baseline">@Model.CurrentBalance</button> <span>@Model.CryptoCode</span>.
|
2019-05-21 11:44:49 +02:00
|
|
|
</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 ">
|
2019-05-21 12:04:39 +02:00
|
|
|
<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>
|
2019-05-21 11:44:49 +02:00
|
|
|
<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">
|
2019-11-08 22:31:21 +01:00
|
|
|
<span class="input-group-text fiat-value" style="display:none;"></span>
|
2019-05-21 11:44:49 +02:00
|
|
|
</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
|
2020-04-07 18:12:15 +02:00
|
|
|
<button type="button" class="crypto-balance-link btn btn-link p-0 align-baseline">@Model.CurrentBalance</button> <span>@Model.CryptoCode</span>.
|
2019-05-21 11:44:49 +02:00
|
|
|
</p>
|
|
|
|
<span asp-validation-for="Outputs[index].Amount" class="text-danger"></span>
|
|
|
|
</div>
|
|
|
|
<div class="form-group">
|
2019-10-14 05:07:41 +02:00
|
|
|
<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>
|
|
|
|
<span asp-validation-for="Outputs[index].SubtractFeesFromOutput" class="text-danger"></span>
|
|
|
|
</div>
|
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" />
|
2020-05-05 12:06:59 +02:00
|
|
|
<span asp-validation-for="FeeSatoshiPerByte" class="text-danger"></span>
|
2018-03-23 08:24:57 +01:00
|
|
|
<span id="FeeRate-Error" class="text-danger"></span>
|
2020-05-07 22:34:39 +02:00
|
|
|
@if (Model.RecommendedSatoshiPerByte.Any())
|
|
|
|
{
|
|
|
|
<div class="text-left mt-1" >
|
|
|
|
<span class="text-muted">
|
|
|
|
Confirm in the next
|
|
|
|
</span>
|
|
|
|
<div class="btn-group btn-group-toggle feerate-options" 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>
|
2020-05-16 22:07:24 +02:00
|
|
|
<input type="hidden" asp-for="RecommendedSatoshiPerByte[index].Target" />
|
|
|
|
<input type="hidden" asp-for="RecommendedSatoshiPerByte[index].FeeRate" />
|
2020-05-07 22:34:39 +02:00
|
|
|
}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
}
|
2018-03-23 08:24:57 +01:00
|
|
|
</div>
|
2019-05-21 11:44:49 +02:00
|
|
|
@if (Model.Outputs.Count == 1)
|
|
|
|
{
|
|
|
|
<div class="form-group">
|
2019-10-14 05:07:41 +02:00
|
|
|
<div class="form-check">
|
|
|
|
<input type="checkbox" asp-for="Outputs[0].SubtractFeesFromOutput" class="form-check-input subtract-fees" />
|
|
|
|
<label asp-for="Outputs[0].SubtractFeesFromOutput" class="form-check-label"></label>
|
|
|
|
<span asp-validation-for="Outputs[0].SubtractFeesFromOutput" class="text-danger"></span>
|
|
|
|
</div>
|
2019-05-21 11:44:49 +02:00
|
|
|
</div>
|
|
|
|
}
|
2020-05-05 12:06:59 +02:00
|
|
|
|
2019-05-08 05:34:33 +02:00
|
|
|
<div class="card">
|
2020-03-23 07:46:54 +01:00
|
|
|
<button id="advancedSettings" class="btn btn-light collapsed" type="button" data-toggle="collapse" data-target="#accordian-advanced" aria-expanded="false" aria-controls="accordian-advanced">
|
2019-11-08 22:31:21 +01:00
|
|
|
Advanced settings
|
|
|
|
</button>
|
2019-05-08 05:34:33 +02:00
|
|
|
<div id="accordian-advanced" class="collapse" aria-labelledby="accordian-advanced-header" data-parent="#accordian-advanced">
|
|
|
|
<div class="card-body">
|
2019-10-14 05:07:41 +02:00
|
|
|
<div class="form-check">
|
|
|
|
<input asp-for="NoChange" class="form-check-input" />
|
|
|
|
<label asp-for="NoChange" class="form-check-label"></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-08 05:34:33 +02:00
|
|
|
</div>
|
2019-05-08 08:24:20 +02:00
|
|
|
@if (Model.SupportRBF)
|
|
|
|
{
|
2019-10-14 05:07:41 +02:00
|
|
|
<div class="form-check">
|
|
|
|
<input asp-for="DisableRBF" class="form-check-input" />
|
|
|
|
<label asp-for="DisableRBF" class="form-check-label"></label>
|
2019-05-21 10:10:07 +02:00
|
|
|
<a href="https://bitcoin.org/en/glossary/rbf" target="_blank">
|
|
|
|
<span class="fa fa-question-circle-o" title="More information..."></span>
|
|
|
|
</a>
|
|
|
|
</div>
|
2019-05-08 08:24:20 +02:00
|
|
|
}
|
2020-01-06 13:57:32 +01:00
|
|
|
@if (!string.IsNullOrEmpty(Model.PayJoinEndpointUrl))
|
|
|
|
{
|
|
|
|
<div class="form-group">
|
|
|
|
<label asp-for="PayJoinEndpointUrl" class="control-label"></label>
|
2020-05-05 12:06:59 +02:00
|
|
|
<input asp-for="PayJoinEndpointUrl" class="form-control" />
|
2020-01-06 13:57:32 +01:00
|
|
|
<span asp-validation-for="PayJoinEndpointUrl" class="text-danger"></span>
|
|
|
|
</div>
|
|
|
|
}
|
2020-03-19 09:44:47 +01:00
|
|
|
<div class="form-group">
|
2020-03-23 07:46:54 +01:00
|
|
|
<button id="toggleInputSelection" type="submit" name="command" value="toggle-input-selection" class="btn btn-sm btn-secondary">Toggle coin selection</button>
|
2020-03-19 09:44:47 +01:00
|
|
|
</div>
|
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">
|
2020-05-23 21:31:21 +02:00
|
|
|
<partial name="WalletSigningMenu" model="@((Model.CryptoCode, Model.NBXSeedAvailable))"/>
|
2020-05-05 12:06:59 +02:00
|
|
|
<button type="submit" name="command" value="add-output" class="ml-1 btn btn-secondary">Add another destination</button>
|
2020-03-27 10:18:20 +01:00
|
|
|
<button type="button" id="bip21parse" class="ml-1 btn btn-secondary" title="Paste BIP21/Address"><i class="fa fa-paste"></i></button>
|
2020-03-26 11:59:28 +01:00
|
|
|
<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>
|
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
|
|
|
|
2020-03-26 11:59:28 +01:00
|
|
|
@section HeadScripts
|
2018-10-31 16:19:25 +01:00
|
|
|
{
|
2020-04-18 17:56:05 +02:00
|
|
|
<bundle name="wwwroot/bundles/wallet-send-bundle.min.js" asp-append-version="true"></bundle>
|
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
|
|
|
}
|