Skip to content

Conversation

0xAlunara
Copy link
Collaborator

Depends on #1422

Focus is on removing stores in favor of tanstack queries & hooks, not whether legacy component make sense. In a few cases I've renamed llama or llamma to market for simplicity.

Copy link

vercel bot commented Sep 24, 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 24, 2025 6:11pm
curve-dapp-storybook Ready Ready Preview Comment Sep 24, 2025 6:11pm

@0xAlunara 0xAlunara changed the title fefactor: collateral zustand to tanstack refactor: collateral zustand to tanstack Sep 24, 2025
@0xAlunara 0xAlunara changed the base branch from main to refactor/remove-dead-loan-code September 24, 2025 00:39
pilotvietnam
pilotvietnam previously approved these changes Sep 24, 2025
0xtutti
0xtutti previously approved these changes Sep 24, 2025
chartExpanded={chartExpanded}
page="create"
/>
{market && (
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why is this added? It results in the page jumping during load

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

For some reason the old code type asserted that llamma couldn't be undefined. But I'm not sure if that assertion is valid. How can it be asserted to not be null when stuff is being loaded? Either the assertion is somehow true and this won't jump, or stuff was being shown prematurely in the old verison. I'd rather keep this check to make sure there's no errors. If people never complained about the page jumping it's probably a safe assumption?

Copy link
Collaborator

Choose a reason for hiding this comment

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

People dont complain because it works, it just looks unprofessional

@0xAlunara 0xAlunara force-pushed the refactor/collateral-zustand-to-tanstack branch from ebf681d to 2804725 Compare September 24, 2025 18:08
@0xAlunara 0xAlunara marked this pull request as ready for review September 24, 2025 18:09
@DanielSchiavini DanielSchiavini marked this pull request as draft September 26, 2025 07:41
return useMemo(() => {
if (!api) return undefined

// If markets aren't found they throw an error, but we want to return undefined instead
Copy link
Collaborator

Choose a reason for hiding this comment

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

no please, ignoring errors is asking for tricky bugs.
If you want to catch invalid market IDs please check the exact exception and return a proper error state, not undefined

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.

4 participants