Show fee rate in transaction detail review

This commit is contained in:
nicolas.dorier
2019-05-16 12:56:06 +09:00
parent 2926865c1b
commit aed98f16bb
3 changed files with 15 additions and 0 deletions

View File

@@ -169,6 +169,10 @@ namespace BTCPayServer.Controllers
{ {
vm.Fee = ValueToString(fee, network); vm.Fee = ValueToString(fee, network);
} }
if (psbtObject.TryGetEstimatedFeeRate(out var feeRate))
{
vm.FeeRate = feeRate.ToString();
}
} }
[HttpPost] [HttpPost]

View File

@@ -23,5 +23,6 @@ namespace BTCPayServer.Models.WalletViewModels
public bool Positive { get; set; } public bool Positive { get; set; }
public List<DestinationViewModel> Destinations { get; set; } = new List<DestinationViewModel>(); public List<DestinationViewModel> Destinations { get; set; } = new List<DestinationViewModel>();
public string Fee { get; set; } public string Fee { get; set; }
public string FeeRate { get; set; }
} }
} }

View File

@@ -72,6 +72,16 @@
<div class="col-lg-3 text-center"></div> <div class="col-lg-3 text-center"></div>
</div> </div>
} }
@if (Model.FeeRate != null)
{
<div class="row">
<div class="col-lg-3 text-center"></div>
<div class="col-lg-6 text-left">
<p>Transaction fee rate: <b>@Model.FeeRate</b></p>
</div>
<div class="col-lg-3 text-center"></div>
</div>
}
<div class="row"> <div class="row">
<div class="col-lg-12 text-center"> <div class="col-lg-12 text-center">
<form method="post" asp-action="WalletPSBTReady"> <form method="post" asp-action="WalletPSBTReady">