Skip to content

feat: add medianAmount to invoice stats - #709

Open
misrasamuelisiguzor-oss wants to merge 1 commit into
Stellar-split:mainfrom
misrasamuelisiguzor-oss:feat/invoice-median-amount
Open

feat: add medianAmount to invoice stats#709
misrasamuelisiguzor-oss wants to merge 1 commit into
Stellar-split:mainfrom
misrasamuelisiguzor-oss:feat/invoice-median-amount

Conversation

@misrasamuelisiguzor-oss

Copy link
Copy Markdown

closes #638
closes #639
closes #640
closes #641

computeInvoiceStats now reports medianAmount alongside avgPayment. The median is derived from a sort of the payment amounts with no external dependencies: the middle value for odd-length sets, the truncating average of the two middle values for even-length sets, and 0 for an empty invoice set. Median is more robust than the mean when an invoice has outlier payments, which matters for financial summary consumers.

computeInvoiceStats now reports medianAmount alongside avgPayment. The
median is derived from a sort of the payment amounts with no external
dependencies: the middle value for odd-length sets, the truncating
average of the two middle values for even-length sets, and 0 for an
empty invoice set. Median is more robust than the mean when an invoice
has outlier payments, which matters for financial summary consumers.

Signed-off-by: afurious <[email protected]>
@drips-wave

drips-wave Bot commented Aug 27, 2026

Copy link
Copy Markdown

@misrasamuelisiguzor-oss Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants