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: replace tokenMap with flattenTokens for balance display cal… #1103

Merged
merged 1 commit into from
Dec 30, 2024

Conversation

trungbach
Copy link
Contributor

This pull request includes changes to the src/libs/utils.ts file to improve token handling and simplify the code. The most important changes include adding a new import for flattenTokens and updating the toSumDisplay function to use this new import.

Improvements to token handling:

  • src/libs/utils.ts: Added a new import for flattenTokens from initCommon to ensure all tokens are properly flattened and accessible.

Code simplification:

  • src/libs/utils.ts: Updated the toSumDisplay function to use flattenTokens for finding the token decimals, removing the need to access the store for allOraichainTokens.…culation

@haunv3 haunv3 merged commit c3e8423 into main Dec 30, 2024
2 of 3 checks passed
@haunv3 haunv3 deleted the fix/display-balance branch December 30, 2024 03:08
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