Skip to content

Version 1.4

Latest
Compare
Choose a tag to compare
@fled-dev fled-dev released this 07 Feb 16:14
· 14 commits to main since this release
ca9457d

Key Enhancements

Modularization & Code Refactoring

  • Configuration Management: Introduced a dedicated Config class to load and manage configuration from config.json with support for environment variable overrides.
  • Wallet Operations: Created a WalletManager class that encapsulates wallet creation and sweeping operations, improving testability and separation of concerns.
  • Code Organization: Refactored functions into clearly defined sections and modules, adhering to PEP 8 and PEP 20 best practices.

Security Improvements

  • Sensitive Data Handling: Sensitive information such as wallet seed phrases is now masked in logs and notifications.
  • Environment Overrides: Sensitive configuration values (e.g., Telegram API key, channel ID, host IP/port) can now be provided via environment variables.
  • Input Validation: Enhanced input validation and sanitization to prevent XSS and ensure proper formatting of API keys, seed phrases, and addresses.

Performance & Scalability

  • IP Lookup Caching: Implemented caching of IP lookup details per request to reduce redundant external API calls.
  • Asynchronous Operations: Applied Gevent monkey patching to enable non-blocking I/O operations and improved concurrency.
  • Health-Check Endpoint: Added a /health endpoint to facilitate monitoring and load balancing.

Error Handling & Logging

  • Improved Exception Handling: Specific exceptions are now caught instead of using bare except: clauses, ensuring errors are logged with context and stack traces.
  • Structured Logging: Refined logging practices to clearly indicate when sensitive data is involved, without exposing it.

Documentation & Maintainability

  • Docstrings & Comments: Added comprehensive docstrings and inline comments across the codebase for better clarity.
  • PEP 8 Compliance: Reformatted code to adhere to Pythonic best practices and maintain consistency across the project.

Breaking Changes

  • Configuration File Updates: The JSON configuration file now includes additional fields: HOST_IP and HOST_PORT. Users must update their api/config.json or supply these values via environment variables.
  • Sensitive Logging: Sensitive information (e.g., wallet seed phrases) is now redacted in logs and notifications. Ensure that any downstream systems or alerts are adjusted accordingly.