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;