Skip to content

Hide Pool C/E LP from portfolio and fix pool LP withdraw UX#479

Merged
temptemp3 merged 2 commits into
nextfrom
beta
Jun 4, 2026
Merged

Hide Pool C/E LP from portfolio and fix pool LP withdraw UX#479
temptemp3 merged 2 commits into
nextfrom
beta

Conversation

@temptemp3
Copy link
Copy Markdown
Contributor

@temptemp3 temptemp3 commented Jun 4, 2026

Summary

  • Apply the same Pool C/E exclusion rules used on the Markets table to the Portfolio page — hide Tinyman LP collateral (LP_TMPOOL2_*) from supplied/borrowed asset lists and portfolio market snapshots while keeping WAD borrow markets on pools C and E visible
  • Add shared config helpers (getPortfolioVisibleTokens, filterPortfolioVisibleMarketRows, isPortfolioExcludedMarketContract) and unit tests
  • Align pool-page LP withdraw with Portfolio: HF-safe max, pool collateral rows, and borrow-aware poolHasNoBorrows instead of a hardcoded value
  • Defer pool list refresh until after the withdraw success modal renders so congrats are not wiped by query invalidation
  • Improve LP success screens with pair icons, LP labels, and a signed-amount snapshot; enable supply/withdraw when Tinyman snapshot is unavailable

Test plan

  • npm test -- src/config/__tests__/marketsTableExclusion.test.ts
  • Open Portfolio with Pool C/E LP positions — LP rows should not appear
  • Confirm WAD borrow on Pool C/E still appears in borrowed assets
  • Confirm health factor / totals still reflect on-chain global values
  • On Pools page, supply LP to platform and confirm success screen shows pair icons, amount, and label (e.g. WAD / ALGO LP)
  • Withdraw partial and max LP; confirm success screen appears and stays visible before pool cards refresh
  • With an open WAD borrow against LP collateral, confirm withdraw respects HF-safe max and does not allow unsafe full withdraw
  • Confirm Supply/Withdraw buttons work when Tinyman pool snapshot fails to load but on-chain supplied balance exists
  • Verify Portfolio withdraw success flow still works (shared WithdrawModal changes)

Made with Cursor

temptemp3 and others added 2 commits June 3, 2026 18:18
Apply the same Markets table exclusion rules to portfolio position lists
and market snapshots so Tinyman LP collateral on pools C and E no longer
appear in supplied/borrowed assets, while WAD borrow on those pools
stays visible.

Co-authored-by: Cursor <cursoragent@cursor.com>
Wire pool-page withdraw like Portfolio with HF-safe max, collateral rows,
and real borrow state. Defer pool refresh until after the success modal
renders so LP congrats are not wiped by query invalidation. Show pair
icons and LP labels on success screens; enable supply/withdraw when
Tinyman snapshot is unavailable.

Co-authored-by: Cursor <cursoragent@cursor.com>
@temptemp3 temptemp3 changed the title Beta Hide Pool C/E LP from portfolio and fix pool LP withdraw UX Jun 4, 2026
@temptemp3 temptemp3 merged commit 70f03bc into next Jun 4, 2026
2 checks passed
@temptemp3 temptemp3 deleted the beta branch June 4, 2026 00:33
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