Skip to content
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

Refactor token verification logic and enhance pool liquidity handling #1126

Merged
merged 2 commits into from
Jan 13, 2025

Conversation

trungbach
Copy link
Contributor

This pull request includes several changes to improve token handling, enhance caching, and refactor code for better readability and performance. The most important changes are grouped by theme below:

Token Handling Improvements:

  • Added a new function inspectTokenFromOraiCommonApi to fetch and inspect token data from the OraiCommon API. (src/helper/index.tsx)
  • Updated initializeOraidexCommon to filter verified Oraichain tokens. (src/initCommon.ts)
  • Refactored useGetPoolList to use the new inspectTokenFromOraiCommonApi function for token inspection. (src/pages/Pool-V3/hooks/useGetPoolList.ts) [1] [2]

Code Refactoring and Simplification:

  • Reorganized imports in src/layouts/App.tsx and added ReactQueryDevtools for development purposes. (src/layouts/App.tsx) [1] [2]
  • Simplified the simulateIncentiveAprPosition function to handle missing tokens gracefully. (src/libs/contractSingleton.ts)

Caching and Performance Enhancements:

  • Enhanced the useGetPoolLiquidityVolume hook by adding caching and refetch configurations. (src/pages/Pool-V3/hooks/useGetPoolLiquidityVolume.ts) [1] [2]
  • Updated the PoolList component to use cached pool liquidities and volumes. (src/pages/Pool-V3/components/PoolList/index.tsx) [1] [2] [3] [4]

Copy link

cloudflare-workers-and-pages bot commented Jan 12, 2025

Deploying beta-oraidex with  Cloudflare Pages  Cloudflare Pages

Latest commit: 5a92786
Status: ✅  Deploy successful!
Preview URL: https://7c363deb.beta-oraidex.pages.dev
Branch Preview URL: https://develop-v3.beta-oraidex.pages.dev

View logs

@trungbach trungbach merged commit 2ffedda into main Jan 13, 2025
3 of 4 checks passed
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.

3 participants