diff --git a/BTCPayServer/Controllers/InvoiceController.UI.cs b/BTCPayServer/Controllers/InvoiceController.UI.cs index 4aac6b1ab..91c39408d 100644 --- a/BTCPayServer/Controllers/InvoiceController.UI.cs +++ b/BTCPayServer/Controllers/InvoiceController.UI.cs @@ -238,7 +238,8 @@ namespace BTCPayServer.Controllers BtcPaid = accounting.Paid.ToString(), Status = invoice.Status, CryptoImage = "/" + GetImage(paymentMethodId, network), - NetworkFeeDescription = $"{accounting.TxRequired} transaction{(accounting.TxRequired > 1 ? "s" : "")} x {paymentMethodDetails.GetTxFee()} {network.CryptoCode}", + NetworkFee = paymentMethodDetails.GetTxFee(), + IsMultiCurrency = invoice.GetPayments().Select(p => p.GetPaymentMethodId()).Concat(new[] { paymentMethod.GetId() }).Distinct().Count() > 1, AllowCoinConversion = storeBlob.AllowCoinConversion, AvailableCryptos = invoice.GetPaymentMethods(_NetworkProvider) .Where(i => i.Network != null) @@ -251,10 +252,6 @@ namespace BTCPayServer.Controllers .ToList() }; - var isMultiCurrency = invoice.GetPayments().Select(p => p.GetPaymentMethodId()).Concat(new[] { paymentMethod.GetId() }).Distinct().Count() > 1; - if (isMultiCurrency) - model.NetworkFeeDescription = $"{accounting.NetworkFee} {network.CryptoCode}"; - var expiration = TimeSpan.FromSeconds(model.ExpirationSeconds); model.TimeLeft = PrettyPrint(expiration); return model; diff --git a/BTCPayServer/Models/InvoicingModels/PaymentModel.cs b/BTCPayServer/Models/InvoicingModels/PaymentModel.cs index 92d957be4..ec42fd82c 100644 --- a/BTCPayServer/Models/InvoicingModels/PaymentModel.cs +++ b/BTCPayServer/Models/InvoicingModels/PaymentModel.cs @@ -43,7 +43,8 @@ namespace BTCPayServer.Models.InvoicingModels public string OrderId { get; set; } public string CryptoImage { get; set; } - public string NetworkFeeDescription { get; internal set; } + public decimal NetworkFee { get; set; } + public bool IsMultiCurrency { get; set; } public int MaxTimeMinutes { get; internal set; } public string PaymentType { get; internal set; } public string PaymentMethodId { get; internal set; } diff --git a/BTCPayServer/Views/Invoice/Checkout-Body.cshtml b/BTCPayServer/Views/Invoice/Checkout-Body.cshtml index 2ab235aac..b974ea885 100644 --- a/BTCPayServer/Views/Invoice/Checkout-Body.cshtml +++ b/BTCPayServer/Views/Invoice/Checkout-Body.cshtml @@ -87,7 +87,14 @@