-
Notifications
You must be signed in to change notification settings - Fork 43
feat: add manage soft liquidation card #1321
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
The latest updates on your projects. Learn more about Vercel for GitHub.
|
import { notify } from '@ui-kit/features/connect-wallet' | ||
import { useUserProfileStore } from '@ui-kit/features/user-profile' | ||
|
||
const handlers = { |
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.
We could maybe also just pass "Closing position" and "Position closed" to useLlammaMutation? 🤔
Btw these are missing translation
|
||
/** | ||
* Custom hook for handling llamma-related mutations with automatic wallet and API validation | ||
* Could argue for a refactor to validate with vest like we do for queries, but I'd rather keep |
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.
We have some good example on how to connect vest with react-hook-form and react-query
curve-frontend/apps/main/src/dex/features/add-gauge-reward-token/ui/AddRewardToken.tsx
Lines 31 to 50 in 5e57f7b
const methods = useForm<AddRewardFormValues>({ | |
...formDefaultOptions, | |
resolver: vestResolver(addGaugeRewardTokenValidationSuite), | |
defaultValues: { | |
rewardTokenId: zeroAddress, | |
distributorId: signerAddress ?? zeroAddress, | |
}, | |
}) | |
const { | |
setError, | |
formState: { isSubmitting }, | |
handleSubmit, | |
} = methods | |
const { | |
mutate: addRewardToken, | |
isPending: isPendingAddRewardToken, | |
isSuccess: isSuccessAddRewardToken, | |
data: addRewardTokenData, | |
} = useAddRewardToken({ chainId, poolId }) |
We can discuss whether react-hook-form is a good idea though, in my own site I'm real happy with Formik
895ee64
to
c814e6d
Compare
c814e6d
to
6f5f7cd
Compare
6f5f7cd
to
2b9a1dd
Compare
2b9a1dd
to
43cfeae
Compare
apps/main/src/loan/components/PageLoanManage/LoanManageSoftLiq.tsx
Outdated
Show resolved
Hide resolved
43cfeae
to
7fb129b
Compare
7fb129b
to
d04d39a
Compare
d04d39a
to
d0a8d1a
Compare
d0a8d1a
to
c8d1261
Compare
c8d1261
to
f03ad3f
Compare
f03ad3f
to
c79f17f
Compare
c79f17f
to
72c8079
Compare
Draft PR to share codebase of the obvious WIP. Most likely functionality will be split off into separate PRs.