Skip to content

Fix pool performance metrics for bounded periods#247

Open
18166714330cl-maker wants to merge 1 commit into
capofficial:mainfrom
18166714330cl-maker:patch-1
Open

Fix pool performance metrics for bounded periods#247
18166714330cl-maker wants to merge 1 commit into
capofficial:mainfrom
18166714330cl-maker:patch-1

Conversation

@18166714330cl-maker
Copy link
Copy Markdown

Fixes #6

This adjusts pool performance calculations so weekly/monthly/yearly metrics use only the selected stat window and numeric arithmetic.

Changes:

  • avoid mutating the shared oldest index while iterating assets
  • sum deposits/withdrawals only across the selected performance window
  • coerce stat values to numbers before arithmetic to avoid string concatenation in reducers

Validation:

  • npm run build

Use the selected stats window for deposits and withdrawals, avoid mutating the shared oldest index across assets, and coerce stat values before arithmetic.
@18166714330cl-maker
Copy link
Copy Markdown
Author

Quick follow-up: I rechecked the failing status. The Vercel check is failing with "Account is blocked", which appears to be an external Vercel account/deployment issue rather than a failure caused by this code change. I also verified locally that npm run build passes for this PR.

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.

Pool metrics are wrong / weird

1 participant