Skip to content

feat(overhaul): better menu, state, and processing#27

Merged
sean-sqds merged 2 commits into
feat/consolidation-optimizationsfrom
feat/major-feature-improvments
May 22, 2026
Merged

feat(overhaul): better menu, state, and processing#27
sean-sqds merged 2 commits into
feat/consolidation-optimizationsfrom
feat/major-feature-improvments

Conversation

@sean-sqds
Copy link
Copy Markdown

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:

  • Optimized getAssets in assets.ts to 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.
  • Improved getSquads in api.ts to 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:

  • Introduced centralized action constants in menuActions.ts, ensuring that menu choices and their handlers remain consistent and robust against label changes.
  • Refactored all inquirer prompt files (inq/main.js, inq/multisigTop.js, inq/settings.js, inq/transaction.js, inq/transactions.js) to use these action constants as value fields 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:

  • Removed the unused @metaplex/js dependency from package.json and eliminated related legacy code, such as the checkIsNFT function and sequential token metadata fetch logic. [1] [2] [3]

Other improvements:

  • Updated menu state machine invocation in index.ts to use an async run method instead of the old top method, reflecting architectural changes.

These changes collectively improve performance, code clarity, and user experience across the application.

@sean-sqds sean-sqds marked this pull request as ready for review May 22, 2026 21:03
@sean-sqds sean-sqds merged commit 6c92ce7 into feat/consolidation-optimizations May 22, 2026
2 checks passed
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