Fix fair node info and fair wallet info commands#881
Merged
Conversation
This was
linked to
issues
Jul 12, 2025
badrogger
approved these changes
Jul 12, 2025
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 updates and improvements to the Mirage Node CLI, including code cleanup, feature enhancements, and bug fixes. The most significant changes involve refactoring imports, adding new utility functions, improving error handling, and updating output formatting for better clarity.
Code Cleanup and Refactoring:
node_cli/cli/mirage_node.pyto improve readability and maintainability. Unused imports likeget_node_signaturewere removed, and others were grouped logically.signature_nodecommand fromnode_cli/cli/mirage_node.py, as it is no longer needed.NODE_BLUEPRINT_NAMEconstant toBLUEPRINT_NAMEinnode_cli/mirage/mirage_node.pyfor consistency and clarity.Feature Enhancements:
get_node_info_plainandget_node_infofunctions innode_cli/mirage/mirage_node.pyto fetch and display Mirage node information in plain or JSON format. [1] [2]print_node_info_miragefunction innode_cli/utils/print_formatters.pyto format and display Mirage node details in a user-friendly way.Error Handling Improvements:
get_requestfunction innode_cli/utils/helper.pyto handle responses that may return either a string or a dictionary, improving flexibility and robustness. Also replacedlogger.errorwithlogger.exceptionfor better error traceability.Output Formatting Updates:
create_backup_archiveinnode_cli/core/node.py("succesfully" → "successfully").print_mirage_wallet_infofunction innode_cli/utils/print_formatters.pyto rename "MIRAGE balance" to "Node balance" for consistency and clarity.Other Changes:
get_wallet_infoinnode_cli/core/wallet.pyto handle payloads more dynamically, ensuring proper formatting based on the payload type.