Skip to content

fix: use index-based token lookup to handle malformed spot_meta (issu…#279

Open
KarolakTibia wants to merge 1 commit intohyperliquid-dex:masterfrom
KarolakTibia:fix/issue-275-index-lookup
Open

fix: use index-based token lookup to handle malformed spot_meta (issu…#279
KarolakTibia wants to merge 1 commit intohyperliquid-dex:masterfrom
KarolakTibia:fix/issue-275-index-lookup

Conversation

@KarolakTibia
Copy link

…e #275)

  • Build token_by_index dictionary to look up tokens by their index field
  • Avoids IndexError when testnet API returns token indices exceeding array bounds
  • Implements suggested fix from issue comment: "leverage the index from the info field"
  • Gracefully handles malformed responses where indices don't match array positions

…hyperliquid-dex#275)

- Build token_by_index dictionary to look up tokens by their index field
- Avoids IndexError when testnet API returns token indices exceeding array bounds
- Implements suggested fix from issue comment: "leverage the index from the info field"
- Gracefully handles malformed responses where indices don't match array positions

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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.

1 participant