Skip to content

Conversation

@0xPearce
Copy link
Collaborator

@0xPearce 0xPearce commented Nov 28, 2025

  • update the add collateral form to match the design
  • added collateral, prevCollateral, prevHealth, prevDebt and prevLTV to the accordion
  • added input and balance in USD
  • prev and current leverage field coming soon, waiting for llamalend.js (there are 2 tickets for it)
  • refactored getErrorMessage from /loan and /lend int /llamalend
Empty With User Value
Screenshot 2025-12-04 at 16 37 43 Screenshot 2025-12-04 at 16 37 56

Gracefully handle user rejection (unlike my Ex):

Screenshot 2025-12-04 at 16 38 10

@vercel
Copy link

vercel bot commented Nov 28, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
curve-dapp Ready Ready Preview, Comment Dec 17, 2025 7:22pm
curve-dapp-storybook Ready Ready Preview, Comment Dec 17, 2025 7:22pm

@0xPearce 0xPearce changed the title feat: loan management form add collateral feat: loan management form add/remove collateral Dec 16, 2025
0xAlunara
0xAlunara previously approved these changes Dec 16, 2025
Copy link
Collaborator

@DanielSchiavini DanielSchiavini left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM comments are nitpicking

value: decimal(new BigNumber(values.userCollateral).plus(state.collateral)) as Decimal,
tokenSymbol: collateralToken?.symbol,
}) ??
null,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

undefined should be OK too right?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shit I forgot to remove it, it's completely useless

state.collateral &&
values.userCollateral && {
value: decimal(
BigNumber.max('0', new BigNumber(state.collateral).minus(new BigNumber(values.userCollateral))),
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
BigNumber.max('0', new BigNumber(state.collateral).minus(new BigNumber(values.userCollateral))),
BigNumber.max(0, new BigNumber(state.collateral).minus(new BigNumber(values.userCollateral))),

Copy link
Collaborator

@DanielSchiavini DanielSchiavini Dec 17, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

btw I also found the clamp function which could be adapted to Decimal clamps

0xAlunara
0xAlunara previously approved these changes Dec 17, 2025
@DanielSchiavini DanielSchiavini dismissed stale reviews from 0xAlunara and themself via 1767430 December 17, 2025 19:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants