Properly counting transactions that impact NetworkFee

This commit is contained in:
rockstardev
2021-07-06 00:43:49 +02:00
committed by Andrew Camilleri
parent edc9429e84
commit 48355129c5
3 changed files with 10 additions and 2 deletions

View File

@@ -557,6 +557,13 @@ namespace BTCPayServer.Controllers
RedirectAutomatically = invoice.RedirectAutomatically,
StoreName = store.StoreName,
TxCount = accounting.TxRequired,
TxCountForFee = storeBlob.NetworkFeeMode switch
{
NetworkFeeMode.Always => accounting.TxRequired,
NetworkFeeMode.MultiplePaymentsOnly => accounting.TxRequired - 1,
NetworkFeeMode.Never => 0,
_ => throw new NotImplementedException()
},
BtcPaid = accounting.Paid.ShowMoney(divisibility),
#pragma warning disable CS0618 // Type or member is obsolete
Status = invoice.StatusString,