-
Notifications
You must be signed in to change notification settings - Fork 3.6k
fix: Inverted price confirm modal when creating pool with native #12507
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: develop
Are you sure you want to change the base?
fix: Inverted price confirm modal when creating pool with native #12507
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
8 Skipped Deployments
|
|
dcb915e to
ae4bfdb
Compare
| baseCurrency && | ||
| quoteCurrency && | ||
| isUnifiedCurrencySorted(baseCurrency as unknown as UnifiedCurrency, quoteCurrency as unknown as UnifiedCurrency), | ||
| isUnifiedCurrencySorted( |
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.
fixed here, rest of the changes are fixing deps warnings with reducing usememo overhead and account chain hook atom
ae4bfdb to
b4d52dc
Compare
db08d05 to
a76c083
Compare
| const tokens = useMemo( | ||
| () => currencies?.filter((currency): currency is Token => Boolean(currency?.isToken)) ?? [], | ||
| // eslint-disable-next-line react-hooks/exhaustive-deps | ||
| [...(currencies ?? [])], |
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.
this might cause issues on dev build, currently one usage of this hook which is already memoized so it is safe to use currencies directly
40aa738 to
088b299
Compare
088b299 to
d2bfe0d
Compare
PR-Codex overview
This PR focuses on optimizing and refactoring code across various components in the application, improving performance and readability, and ensuring better handling of state and filters.
Detailed summary
PositionPage.tsxto streamline filtering logic.useV3CreateFormto usebaseCurrency.wrappedfor sorting.useV3CreateForm.useActiveChainIdto directly return state fromaccountActiveChainAtom.unifiedAccounttoAccountChainStateinaccountStateAtoms.ts.useCurrencyBalancesWithChainto improve memoization of currencies.useInfinityPositionsto combine filtering and sorting logic.