Skip to content

fix: add warning for missing token metadata in spot portfolio - #29

Open
MayurK-cmd wants to merge 1 commit into
jup-ag:mainfrom
MayurK-cmd:fix/spot-portfolio-missing-token-metadata-handling
Open

fix: add warning for missing token metadata in spot portfolio#29
MayurK-cmd wants to merge 1 commit into
jup-ag:mainfrom
MayurK-cmd:fix/spot-portfolio-missing-token-metadata-handling

Conversation

@MayurK-cmd

Copy link
Copy Markdown

fix: add warning for missing token metadata in spot portfolio

When the spot portfolio command fetches token metadata from the API,
if any token's metadata is not found (network failure, new token not
indexed, etc.), the token was silently skipped without warning. This could
lead to users seeing an incomplete portfolio without realizing some
holdings are missing.

Now logs a warning when metadata fetch fails, including the mint address.

Changes:

  • Add console.warn() when tokenMap.get(mint) returns undefined
  • Include mint address in warning message for debugging
  • Add e2e test verifying command completes without crashing

Fixes: #24

Previously, when token metadata was unavailable from the API, the spot
portfolio command would silently skip tokens without warning the user,
leading to incomplete or misleading portfolio displays.

Changes:
- Add console.warn() when token metadata lookup fails
- Include mint address in warning for debugging
- Add e2e test verifying command handles missing metadata gracefully
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.

Missing null check for token metadata in spot portfolio

1 participant