fix(flood): include dewhitelisted wells in claim mow#424
Merged
Conversation
The wallet flood claim panel displays plenty from `mayBeWhitelistedTokens` (whitelisted + dewhitelisted) so users see WSOL/WETH proceeds, but the submit path only mowed currently-whitelisted tokens. Without a mow on the dewhitelisted wells (PINTO_WETH, PINTO_WSOL), the user's per-well `wellsPlenty` is never credited, so `claimAllPlenty` returns 0 for them. Switch `tokensToMow` to `mayBeWhitelistedTokens`, matching the existing pattern in `useClaimRewards.tsx`. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
✅ Deploy Preview for pintomoney ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
The cache subgraph schema source was still pointing at graph.bean.money/cache (a Beanstalk-fork leftover) while the runtime correctly hits graph.pinto.money/cache. The legacy bean.money/cache endpoint started returning 500s, breaking codegen in CI. Both endpoints expose the same cache_* query fields, so this is a drop-in swap. Regenerated types pick up Pinto-specific schema diffs (fractional temperatures, dropped CachedTokenYield which was unused, plus several additional Cached* hourly snapshot entities). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
claimAllPlenty iterates only currently-whitelisted SOP wells via getWhitelistedWellLpTokens, so plenty sitting in user storage for dewhitelisted wells (PINTO_WETH, PINTO_WSOL) is silently skipped. That's why the wallet panel showed WSOL/WETH proceeds but claiming transferred nothing for those wells. Bundle an explicit claimPlenty(well, toMode) into the farm call for every dewhitelisted well the user has nonzero plenty in, alongside the existing claimAllPlenty call. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Mowing dewhitelisted tokens doesn't help recover flood plenty (the contract's _handleRainAndSops only iterates whitelisted wells), and the actual fix lives in the explicit claimPlenty calls. Restore the original whitelistedTokens scope for the mow. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
WalletButtonClaim.tsxmowed onlywhitelistedTokens, but the dewhitelisted LP tokens (PINTO_WETH,PINTO_WSOL) still hold flood plenty for users. In Beanstalk's flood mechanics,_mow(token)is what credits the user's per-wellwellsPlenty— without it,claimAllPlentyreturns 0 for those wells.tokensToMowtomayBeWhitelistedTokens(whitelisted + dewhitelisted), matching the pattern already used inuseClaimRewards.tsx:57.Why display was right but submit was wrong
useFarmerSilo.ts:506iteratesmayBeWhitelistedTokens→ users saw WSOL/WETH plenty.WalletButtonClaim.tsx:85mappedwhitelistedTokensonly → mow skipped dewhitelisted wells →claimAllPlentyhad nothing credited.Test plan
🤖 Generated with Claude Code