From aed98f16bb9381d5dc2c7ffb8da17852e986cfde Mon Sep 17 00:00:00 2001 From: "nicolas.dorier" Date: Thu, 16 May 2019 12:56:06 +0900 Subject: [PATCH] Show fee rate in transaction detail review --- BTCPayServer/Controllers/WalletsController.PSBT.cs | 4 ++++ .../WalletViewModels/WalletPSBTReadyViewModel.cs | 1 + BTCPayServer/Views/Wallets/WalletPSBTReady.cshtml | 10 ++++++++++ 3 files changed, 15 insertions(+) diff --git a/BTCPayServer/Controllers/WalletsController.PSBT.cs b/BTCPayServer/Controllers/WalletsController.PSBT.cs index adaaa7218..8b0fa5b14 100644 --- a/BTCPayServer/Controllers/WalletsController.PSBT.cs +++ b/BTCPayServer/Controllers/WalletsController.PSBT.cs @@ -169,6 +169,10 @@ namespace BTCPayServer.Controllers { vm.Fee = ValueToString(fee, network); } + if (psbtObject.TryGetEstimatedFeeRate(out var feeRate)) + { + vm.FeeRate = feeRate.ToString(); + } } [HttpPost] diff --git a/BTCPayServer/Models/WalletViewModels/WalletPSBTReadyViewModel.cs b/BTCPayServer/Models/WalletViewModels/WalletPSBTReadyViewModel.cs index c214d9c26..f8371cb5d 100644 --- a/BTCPayServer/Models/WalletViewModels/WalletPSBTReadyViewModel.cs +++ b/BTCPayServer/Models/WalletViewModels/WalletPSBTReadyViewModel.cs @@ -23,5 +23,6 @@ namespace BTCPayServer.Models.WalletViewModels public bool Positive { get; set; } public List Destinations { get; set; } = new List(); public string Fee { get; set; } + public string FeeRate { get; set; } } } diff --git a/BTCPayServer/Views/Wallets/WalletPSBTReady.cshtml b/BTCPayServer/Views/Wallets/WalletPSBTReady.cshtml index debd47efc..1dcdb5c60 100644 --- a/BTCPayServer/Views/Wallets/WalletPSBTReady.cshtml +++ b/BTCPayServer/Views/Wallets/WalletPSBTReady.cshtml @@ -72,6 +72,16 @@
} + @if (Model.FeeRate != null) + { +
+
+
+

Transaction fee rate: @Model.FeeRate

+
+
+
+ }