Repository navigation
fix(keys): use Promise.allSettled to handle corrupted keypair files - #36
Open
NathanOyewole wants to merge 2 commits into
Open
NathanOyewole wants to merge 2 commits into
NathanOyewole wants to merge 2 commits into
Conversation
Instead of silently skipping tokens with missing metadata, log a warning and display the token with available on-chain information (mint address, raw balance). This prevents incomplete portfolio displays without user awareness. Fixes jup-ag#24
Replace Promise.all() with Promise.allSettled() so that a single corrupted or unreadable keypair file no longer crashes the entire keys list command. Valid keys are still displayed, and a warning is logged for any that failed to load. Fixes jup-ag#23
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #23. The keys list command used
Promise.all()to load all keypairs in parallel. If any single keypair file was corrupted or unreadable, the entirePromise.all()rejected and the command failed, preventing users from seeing their valid keys.Fix
Promise.all()withPromise.allSettled().Test plan
jup keys list— verify valid keys are displayed and a warning is logged for the corrupted file.