Skip to content

Disable Mint button when borrow cap utilization reaches threshold (#384)#397

Merged
temptemp3 merged 1 commit into
nextfrom
fix/disable-mint-near-borrow-cap-384
May 28, 2026
Merged

Disable Mint button when borrow cap utilization reaches threshold (#384)#397
temptemp3 merged 1 commit into
nextfrom
fix/disable-mint-near-borrow-cap-384

Conversation

@temptemp3

Copy link
Copy Markdown
Contributor

Summary

  • Disables the Mint button on mintable (sToken) markets when borrow cap utilization reaches the existing 95% threshold (CAP_UTILIZATION_THRESHOLD), matching Supply/Borrow cap protection behavior.
  • Applies across desktop, tablet, and mobile Markets views via MarketsTableActions, STokenRow, STokenTabletRow, and STokenCard.
  • Adds tooltip copy: "Minting temporarily unavailable due to borrow cap utilization" and shows borrow cap status badges for mintable markets.

Closes #384

Test plan

  • Open Markets page on a mintable market (e.g. WAD A Market) with borrow utilization below 95% — Mint button is enabled
  • When totalBorrow / borrowCap >= 0.95, Mint button is disabled with tooltip on hover
  • Verify disabled styling matches Supply/Borrow disabled states
  • Confirm behavior on desktop table, tablet table, and mobile card views
  • Confirm borrow cap badge appears for mintable markets near capacity

Made with Cursor

Align mintable market UX with existing supply/borrow cap protection by
disabling Mint when borrow utilization hits the configured 95% threshold.
Applies across desktop, tablet, and mobile Markets views with a tooltip
explaining why minting is unavailable.

Co-authored-by: Cursor <cursoragent@cursor.com>
@temptemp3 temptemp3 merged commit 61d600d into next May 28, 2026
2 checks passed
@temptemp3 temptemp3 deleted the fix/disable-mint-near-borrow-cap-384 branch June 1, 2026 06:32
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.

Disable Mint Button Near Borrow Cap Utilization

1 participant