Remove warning

This commit is contained in:
nicolas.dorier 2018-12-27 15:37:11 +09:00
parent d219f50912
commit d76dabdca6

View file

@ -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,