Skip to content

Fix fair node info and fair wallet info commands#881

Merged
dmytrotkk merged 2 commits intomiragefrom
fix-fair-commands
Jul 15, 2025
Merged

Fix fair node info and fair wallet info commands#881
dmytrotkk merged 2 commits intomiragefrom
fix-fair-commands

Conversation

@dmytrotkk
Copy link
Copy Markdown
Collaborator

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:

  • Consolidated and reordered imports in node_cli/cli/mirage_node.py to improve readability and maintainability. Unused imports like get_node_signature were removed, and others were grouped logically.
  • Removed the signature_node command from node_cli/cli/mirage_node.py, as it is no longer needed.
  • Renamed the NODE_BLUEPRINT_NAME constant to BLUEPRINT_NAME in node_cli/mirage/mirage_node.py for consistency and clarity.

Feature Enhancements:

  • Added get_node_info_plain and get_node_info functions in node_cli/mirage/mirage_node.py to fetch and display Mirage node information in plain or JSON format. [1] [2]
  • Introduced the print_node_info_mirage function in node_cli/utils/print_formatters.py to format and display Mirage node details in a user-friendly way.

Error Handling Improvements:

  • Updated the get_request function in node_cli/utils/helper.py to handle responses that may return either a string or a dictionary, improving flexibility and robustness. Also replaced logger.error with logger.exception for better error traceability.

Output Formatting Updates:

  • Fixed a typo in the success message for create_backup_archive in node_cli/core/node.py ("succesfully" → "successfully").
  • Updated the print_mirage_wallet_info function in node_cli/utils/print_formatters.py to rename "MIRAGE balance" to "Node balance" for consistency and clarity.

Other Changes:

  • Adjusted logic in get_wallet_info in node_cli/core/wallet.py to handle payloads more dynamically, ensuring proper formatting based on the payload type.

@dmytrotkk dmytrotkk merged commit eb0df6d into mirage Jul 15, 2025
1 of 3 checks passed
@dmytrotkk dmytrotkk deleted the fix-fair-commands branch July 15, 2025 12:10
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.

Fix wallet info on boot version of mirage-cli Implement fair node info command in the node-cli

2 participants