Skip to content

fix(flood): include dewhitelisted wells in claim mow#424

Merged
fr1jo merged 4 commits into
mainfrom
fix/flood-claim-include-dewhitelisted-wells
May 4, 2026
Merged

fix(flood): include dewhitelisted wells in claim mow#424
fr1jo merged 4 commits into
mainfrom
fix/flood-claim-include-dewhitelisted-wells

Conversation

@fr1jo

@fr1jo fr1jo commented May 4, 2026

Copy link
Copy Markdown
Contributor

Summary

  • The wallet flood claim panel was showing WSOL/WETH proceeds correctly but the submit transaction wasn't actually claiming them.
  • Root cause: WalletButtonClaim.tsx mowed only whitelistedTokens, 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-well wellsPlenty — without it, claimAllPlenty returns 0 for those wells.
  • Fix: switch tokensToMow to mayBeWhitelistedTokens (whitelisted + dewhitelisted), matching the pattern already used in useClaimRewards.tsx:57.

Why display was right but submit was wrong

  • Display: useFarmerSilo.ts:506 iterates mayBeWhitelistedTokens → users saw WSOL/WETH plenty.
  • Submit: WalletButtonClaim.tsx:85 mapped whitelistedTokens only → mow skipped dewhitelisted wells → claimAllPlenty had nothing credited.

Test plan

  • Connect wallet with accrued WSOL/WETH plenty from a prior flood (PINTO_WETH / PINTO_WSOL wells).
  • Open wallet panel → confirm displayed WSOL/WETH amounts unchanged.
  • Click "Claim from Flood" and confirm the tx.
  • Verify user's WSOL and WETH balances increase by displayed amounts.
  • Regression: claiming users with only currently-whitelisted SOPs still works.

🤖 Generated with Claude Code

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>
@netlify

netlify Bot commented May 4, 2026

Copy link
Copy Markdown

Deploy Preview for pintomoney ready!

Name Link
🔨 Latest commit a61082f
🔍 Latest deploy log https://app.netlify.com/projects/pintomoney/deploys/69f8c696254a490009a5e3b9
😎 Deploy Preview https://deploy-preview-424.preview.pinto.money
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

fr1jo and others added 3 commits May 4, 2026 12:08
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>
@fr1jo fr1jo merged commit 172caf9 into main May 4, 2026
6 checks passed
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