Skip to content

fix(stats): compute average fee using sent transactions only - #71

Open
Victorakinwunmi wants to merge 1 commit into
StellarSend:mainfrom
Victorakinwunmi:fix/issue-58-average-fee-sent-only
Open

fix(stats): compute average fee using sent transactions only#71
Victorakinwunmi wants to merge 1 commit into
StellarSend:mainfrom
Victorakinwunmi:fix/issue-58-average-fee-sent-only

Conversation

@Victorakinwunmi

Copy link
Copy Markdown

Closes #58

Summary of Changes:

  • QuickStats: Filtered transactions down to direction === 'sent' before computing avgFee so fees paid by senders on incoming payments are excluded from the wallet's personal fee metrics.
  • HistorySummary: Updated totalFees and average fee calculations in History.tsx to aggregate over sent transactions only.
  • Safely handles edge cases with 0 sent transactions by returning '0'.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

QuickStats/HistorySummary's 'Average Fee' averages fee across sent AND received transactions, but fees are only ever paid by the sender

1 participant