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

Token address processing fixes #358

Merged
merged 2 commits into from
Dec 11, 2024

Conversation

MrRoudyk
Copy link
Contributor

@MrRoudyk MrRoudyk commented Dec 6, 2024

Fixed calculation of token utilization statistics in get_utilization_stats (apps/dashboard_app/helpers/protocol_stats.py):

  • Added handling of division by zero cases to prevent exceptions and ensure correct utilization metrics calculation
  • Simplified and optimized function code

Added token address normalization using add_leading_zeros (apps/dashboard_app/helpers/tools.py):

  • Added consistent address format handling
  • Prevented errors related to address format mismatches during data processing

Status of known issues:

  • ✅ Fixed issue with STRK token (0x4718f5a0fc34cc1af16a1cdee98ffb20c31f5cd61d6ab07201858f4287c938d) by normalizing address format
  • ⚠️ Error for DAI token (0x00da114221cb83fa859dbdb4c44beeaa0bb37c7537ad5ae66fe5e0efd20e6eb3) persists as this address is missing from API response

@djeck1432 djeck1432 self-requested a review December 6, 2024 14:46
Copy link
Collaborator

@djeck1432 djeck1432 left a comment

Choose a reason for hiding this comment

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

Looks good to me

@djeck1432 djeck1432 merged commit 84f1f46 into CarmineOptions:master Dec 11, 2024
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.

2 participants