feat(overhaul): better menu, state, and processing#27
Merged
sean-sqds merged 2 commits intoMay 22, 2026
Merged
Conversation
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.
This pull request introduces several improvements and refactors to the codebase, with a focus on performance, maintainability, and consistency in user interaction. The most significant changes include a major optimization of token asset fetching, standardization of menu action handling, and improvements to the inquirer prompt system. Additionally, some unused dependencies and code have been removed for clarity and efficiency.
Performance and API improvements:
getAssetsinassets.tsto batch all on-chain lookups for SPL tokens and NFTs, eliminating unnecessary sequential requests and off-chain JSON fetches. This significantly improves performance, especially for users with many tokens. NFTs are now detected using edition account existence or decimals, and user-facing fields are populated from on-chain metadata or the SPL token registry when available.getSquadsinapi.tsto use efficient memcmp filters for finding relevant multisig accounts, avoiding fetching and filtering all accounts client-side, which is crucial for scalability.Menu and prompt system refactor:
menuActions.ts, ensuring that menu choices and their handlers remain consistent and robust against label changes.inq/main.js,inq/multisigTop.js,inq/settings.js,inq/transaction.js,inq/transactions.js) to use these action constants asvaluefields for choices, improving maintainability and reducing the risk of mismatches between UI and logic. [1] [2] [3] [4] [5] [6] [7] [8]Code cleanup and dependency management:
@metaplex/jsdependency frompackage.jsonand eliminated related legacy code, such as thecheckIsNFTfunction and sequential token metadata fetch logic. [1] [2] [3]Other improvements:
index.tsto use an asyncrunmethod instead of the oldtopmethod, reflecting architectural changes.These changes collectively improve performance, code clarity, and user experience across the application.