mirror of
https://github.com/btcpayserver/btcpayserver.git
synced 2024-11-19 01:43:50 +01:00
Fix: The lightning symbol was missing in the payment stats (#6376)
This commit is contained in:
parent
f5d26a1555
commit
7e7d4086cd
@ -225,6 +225,10 @@ public class LightningAutomatedPayoutProcessor : BaseAutomatedPayoutProcessor<Li
|
|||||||
var proofBlob = new PayoutLightningBlob { PaymentHash = bolt11PaymentRequest.PaymentHash.ToString() };
|
var proofBlob = new PayoutLightningBlob { PaymentHash = bolt11PaymentRequest.PaymentHash.ToString() };
|
||||||
string errorReason = null;
|
string errorReason = null;
|
||||||
string preimage = null;
|
string preimage = null;
|
||||||
|
// If success:
|
||||||
|
// * Is null, we don't know the status. The payout should become pending. (LightningPendingPayoutListener will monitor the situation)
|
||||||
|
// * Is true, we knew the transfer was done. The payout should be completed.
|
||||||
|
// * Is false, we knew it didn't happen. The payout can be retried.
|
||||||
bool? success = null;
|
bool? success = null;
|
||||||
LightMoney amountSent = null;
|
LightMoney amountSent = null;
|
||||||
|
|
||||||
|
@ -251,7 +251,9 @@ namespace BTCPayServer.Plugins.Crowdfund
|
|||||||
.Select(s => s.Value.CurrencyValue).Sum();
|
.Select(s => s.Value.CurrencyValue).Sum();
|
||||||
foreach (var kv in allStats
|
foreach (var kv in allStats
|
||||||
.GroupBy(k => k.Key, k => k.Value)
|
.GroupBy(k => k.Key, k => k.Value)
|
||||||
.Select(g => (g.Key, CurrencyValue: g.Sum(s => s.CurrencyValue))))
|
.Select(g => (g.Key,
|
||||||
|
PaymentCurrency: g.Select(s => s.Currency).First(),
|
||||||
|
CurrencyValue: g.Sum(s => s.CurrencyValue))))
|
||||||
{
|
{
|
||||||
var pmi = PaymentMethodId.Parse(kv.Key);
|
var pmi = PaymentMethodId.Parse(kv.Key);
|
||||||
r.TryAdd(kv.Key, new PaymentStat()
|
r.TryAdd(kv.Key, new PaymentStat()
|
||||||
@ -259,7 +261,7 @@ namespace BTCPayServer.Plugins.Crowdfund
|
|||||||
Label = _prettyNameProvider.PrettyName(pmi),
|
Label = _prettyNameProvider.PrettyName(pmi),
|
||||||
Percent = (kv.CurrencyValue / total) * 100.0m,
|
Percent = (kv.CurrencyValue / total) * 100.0m,
|
||||||
// Note that the LNURL will have the same LN
|
// Note that the LNURL will have the same LN
|
||||||
IsLightning = pmi == PaymentTypes.LN.GetPaymentMethodId(kv.Key)
|
IsLightning = pmi == PaymentTypes.LN.GetPaymentMethodId(kv.PaymentCurrency)
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
return r;
|
return r;
|
||||||
|
@ -873,7 +873,7 @@ retry:
|
|||||||
.GroupBy(p => p.GroupKey)
|
.GroupBy(p => p.GroupKey)
|
||||||
.ToDictionary(p => p.Key, p => new InvoiceStatistics.Contribution
|
.ToDictionary(p => p.Key, p => new InvoiceStatistics.Contribution
|
||||||
{
|
{
|
||||||
Currency = p.Key,
|
Currency = p.Select(p => p.Currency).First(),
|
||||||
Settled = p.All(v => v.Settled),
|
Settled = p.All(v => v.Settled),
|
||||||
Divisibility = p.Max(p => p.Divisibility),
|
Divisibility = p.Max(p => p.Divisibility),
|
||||||
Value = p.Select(v => v.Value).Sum(),
|
Value = p.Select(v => v.Value).Sum(),
|
||||||
|
Loading…
Reference in New Issue
Block a user