From d76dabdca6bf1a7d100043614a56bd3e8d485649 Mon Sep 17 00:00:00 2001 From: "nicolas.dorier" Date: Thu, 27 Dec 2018 15:37:11 +0900 Subject: [PATCH] Remove warning --- BTCPayServer/Services/Invoices/Export/InvoiceExport.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/BTCPayServer/Services/Invoices/Export/InvoiceExport.cs b/BTCPayServer/Services/Invoices/Export/InvoiceExport.cs index f5afc686f..10f46b99d 100644 --- a/BTCPayServer/Services/Invoices/Export/InvoiceExport.cs +++ b/BTCPayServer/Services/Invoices/Export/InvoiceExport.cs @@ -65,8 +65,8 @@ namespace BTCPayServer.Services.Invoices.Export var pdata = payment.GetCryptoPaymentData(); var pmethod = invoice.GetPaymentMethod(payment.GetPaymentMethodId(), Networks); - - var paidAfterNetworkFees = pdata.GetValue() - pmethod.TxFee.ToDecimal(NBitcoin.MoneyUnit.BTC); + var paymentFee = pmethod.GetPaymentMethodDetails().GetTxFee(); + var paidAfterNetworkFees = pdata.GetValue() - paymentFee; invoiceDue -= paidAfterNetworkFees * pmethod.Rate; var target = new ExportInvoiceHolder @@ -82,7 +82,7 @@ namespace BTCPayServer.Services.Invoices.Export // so if fee is 10000 satoshis, customer can essentially send infinite number of tx // and merchant effectivelly would receive 0 BTC, invoice won't be paid // while looking just at export you could sum Paid and assume merchant "received payments" - NetworkFee = pmethod.TxFee.ToDecimal(NBitcoin.MoneyUnit.BTC).ToString(CultureInfo.InvariantCulture), + NetworkFee = paymentFee.ToString(CultureInfo.InvariantCulture), InvoiceDue = invoiceDue, OrderId = invoice.OrderId, StoreId = invoice.StoreId,