Skip to content

Conversation

0xAlunara
Copy link
Collaborator

Draft PR to share codebase of the obvious WIP. Most likely functionality will be split off into separate PRs.

Copy link

vercel bot commented Sep 2, 2025

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

Project Deployment Preview Comments Updated (UTC)
curve-dapp Ready Ready Preview Comment Sep 18, 2025 9:30pm
curve-dapp-storybook Ready Ready Preview Comment Sep 18, 2025 9:30pm

@0xAlunara 0xAlunara marked this pull request as draft September 2, 2025 13:48
import { notify } from '@ui-kit/features/connect-wallet'
import { useUserProfileStore } from '@ui-kit/features/user-profile'

const handlers = {
Copy link
Collaborator

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
Copy link
Collaborator

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

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

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.

2 participants