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

Update reward info fetching and improve pool data handling #1169

Merged
merged 1 commit into from
Mar 3, 2025
Merged

Conversation

trungbach
Copy link
Contributor

This pull request includes several changes to the src/pages/Pools and src/reducer/onchainTokens.ts files to improve functionality and fix potential issues. The most important changes include updates to the reward information fetching logic, handling of null values, and enhancements to the token update process.

Improvements to reward information fetching:

  • src/pages/Pools/hooks/hooks.ts: Modified the useQuery call in useGetRewardInfo to disable refetching on window focus, which can improve performance.

Handling of null values:

Enhancements to token update process:

  • src/reducer/onchainTokens.ts: Added a call to addToOraichainTokens in optimisticUpdateToken to ensure tokens are properly added to the state.

Other changes:

  • src/pages/Pools/index.tsx: Added useEffect import to manage side effects and updated ListPools and ListPoolsMobile components to display empty arrays when the address is not provided, improving conditional rendering logic. [1] [2]
  • src/reducer/onchainTokens.ts: Imported updateAllOraichainTokens to ensure all tokens are updated correctly.

@trungbach trungbach requested review from haunv3 and quangdz1704 March 3, 2025 07:12
Copy link
Contributor

@quangdz1704 quangdz1704 left a comment

Choose a reason for hiding this comment

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

lgtm

@trungbach trungbach merged commit 3f3deff into main Mar 3, 2025
3 of 4 checks passed
@trungbach trungbach deleted the fix/pool branch March 3, 2025 10:31
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