Skip to content

Account for pending donations when displaying fund balance#669

Open
gzurowski wants to merge 2 commits intomainfrom
endaoment/fund-balance
Open

Account for pending donations when displaying fund balance#669
gzurowski wants to merge 2 commits intomainfrom
endaoment/fund-balance

Conversation

@gzurowski
Copy link
Member

@gzurowski gzurowski commented Feb 28, 2026

Since the uscdBalance in 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 usdcBalance to reflect an effective available balance by subtracting lifetimeDonationsUsdc from the API-provided usdcBalance before converting micros to dollars.

Adds a small helper (getAvailableBalance) and updates transformEndaomentFund to 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.

@gzurowski gzurowski requested a review from a team as a code owner February 28, 2026 02:18
@chatgpt-codex-connector
Copy link

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Credits must be used to enable repository wide code reviews.

@vercel
Copy link
Contributor

vercel bot commented Feb 28, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
web Ready Ready Preview, Comment Mar 2, 2026 0:13am

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@sonarqubecloud
Copy link

sonarqubecloud bot commented Mar 2, 2026

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.

1 participant