-
Notifications
You must be signed in to change notification settings - Fork 88
feat: add high price impact acknowledgement to Boost form #5197
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
🦋 Changeset detectedLatest commit: 41c8bc4 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
f00e0ca to
4a31c45
Compare
3ea7bd7 to
f6e395d
Compare
6124e25 to
bf1269e
Compare
bf1269e to
1e18c49
Compare
* build(evm,ui): upgrade tailwind to v4, update mui theme * refactor(evm): tailwind v4 classNames migration (perf by upgrade tool) * refactor(evm): unnecessary className changes done by upgrade tool * build: update yarn lock * fix(evm): modify unichain-theme class in html tag * fix(evm,ui): update configs and fix ui glitches, revert unnecessary className changes * refactor(landing,ui): upgrade tailwind to v4 in landing app * feat: add pointer to buttons + refactor Delimiter * style(landing): fix style differences, remove normalize.css * build(none): update yarn.lock and changeset * build(evm,landing): fix cicd check/lint errors * fix: opacity class + add chain ID to transaction history --------- Co-authored-by: therealemjy <maxime.julian.creations@gmail.com>
refactor: always show user assets only filter
1e18c49 to
78a3d0e
Compare
78a3d0e to
a07e965
Compare
| const hasCollateral = pool.assets.some( | ||
| asset => | ||
| // Skip vBNB && Skip tokens for which user has no supply | ||
| asset.vToken.symbol !== 'vBNB' && asset.userSupplyBalanceCents.isGreaterThan(0), | ||
| ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's no need to filter vBNB out, we already do that line 25 because the repayWithCollateral token action is disabled for vBNB. Also, it's not just the user supply balance of the asset that needs to be checked, but rather the borrow limit of the user within that pool (other assets can contribute towards the borrow limit of the user is they have enabled them as collateral).
The check should be:
const hasCollateral = pool.userBorrowLimitCents?.isGreaterThan(0);| content: hasCollateral ? ( | ||
| <RepayWithCollateralForm pool={pool} asset={asset} /> | ||
| ) : ( | ||
| <DisabledActionNotice token={asset.vToken.underlyingToken} action={'repay'} /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The action isn't disabled, instead it's a warning with the message I gave you in DM that we should display ("You do not have any collateral to repay with"):
<NoticeWarning
description={t('operationForm.repayTab.warning.noCollateral')}
/>
Changes
evm app