Account for pending donations when displaying fund balance#669
Account for pending donations when displaying fund balance#669
Conversation
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
Bugbot Free Tier Details
Your team is on the Bugbot Free tier. On this plan, Bugbot will review limited PRs each billing cycle for each member of your team.
To receive Bugbot reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
|



Since the
uscdBalancein Endaoment's API does not account for pending transactions, this change updates the balance to reflect all transactions (both cleared and pending) for display purposes.Note
Low Risk
Low risk: small, display-only balance calculation change confined to the Endaoment fund transform; main risk is incorrect arithmetic/field interpretation causing under/overstated balances.
Overview
Adjusts displayed Endaoment fund
usdcBalanceto reflect an effective available balance by subtractinglifetimeDonationsUsdcfrom the API-providedusdcBalancebefore converting micros to dollars.Adds a small helper (
getAvailableBalance) and updatestransformEndaomentFundto use it so pending donations not yet reflected by the API don’t inflate the shown balance.Written by Cursor Bugbot for commit a5e3f5e. This will update automatically on new commits. Configure here.