diff --git a/BTCPayServer/Models/InvoicingModels/InvoiceDetailsModel.cs b/BTCPayServer/Models/InvoicingModels/InvoiceDetailsModel.cs index a2443d11d..e21950dcc 100644 --- a/BTCPayServer/Models/InvoicingModels/InvoiceDetailsModel.cs +++ b/BTCPayServer/Models/InvoicingModels/InvoiceDetailsModel.cs @@ -22,6 +22,8 @@ namespace BTCPayServer.Models.InvoicingModels public bool Replaced { get; set; } public BitcoinLikePaymentData CryptoPaymentData { get; set; } public string AdditionalInformation { get; set; } + + public decimal NetworkFee { get; set; } } public class OffChainPaymentViewModel diff --git a/BTCPayServer/Views/Shared/Bitcoin/ViewBitcoinLikePaymentData.cshtml b/BTCPayServer/Views/Shared/Bitcoin/ViewBitcoinLikePaymentData.cshtml index 2ab8f25f6..6ab381759 100644 --- a/BTCPayServer/Views/Shared/Bitcoin/ViewBitcoinLikePaymentData.cshtml +++ b/BTCPayServer/Views/Shared/Bitcoin/ViewBitcoinLikePaymentData.cshtml @@ -41,12 +41,14 @@ m.TransactionLink = string.Format(CultureInfo.InvariantCulture, payment.Network.BlockExplorerLink, m.TransactionId); m.Replaced = !payment.Accounted; m.CryptoPaymentData = onChainPaymentData; + m.NetworkFee = payment.NetworkFee; return m; }).Where(model => model != null); } @if (onchainPayments.Any()) { + var hasNetworkFee = onchainPayments.Sum(a => a.NetworkFee) > 0;

On-Chain payments

@@ -57,6 +59,15 @@ Index Deposit address Amount + @if (hasNetworkFee) + { + + Network Fee + + + + + } Transaction Id Confirmations @@ -69,7 +80,11 @@ @(payment.CryptoPaymentData.KeyPath?.ToString()?? "Unknown") @payment.DepositAddress @payment.CryptoPaymentData.GetValue() @Safe.Raw(payment.AdditionalInformation is string i ? $"
({i})" : string.Empty) - + @if (hasNetworkFee) + { + @payment.NetworkFee + } +