fix: correct utils module import path in wallet commands
Some checks failed
CLI Tests / test-cli (push) Has been cancelled
Cross-Node Transaction Testing / transaction-test (push) Has been cancelled
Deploy to Testnet / deploy-testnet (push) Has been cancelled
Multi-Node Stress Testing / stress-test (push) Has been cancelled
Security Scanning / security-scan (push) Has been cancelled

- Fixed path to include /cli directory for utils.dual_mode_wallet_adapter import
- Changed from parent.parent.parent to parent.parent.parent.parent / "cli"
- Ensures utils module can be found when running wallet commands
- Fixes ModuleNotFoundError for utils.dual_mode_wallet_adapter
This commit is contained in:
aitbc
2026-05-26 10:58:37 +02:00
parent 4c468291bb
commit a70b901072

View File

@@ -122,7 +122,7 @@ def wallet(ctx, wallet_name: Optional[str], wallet_path: Optional[str], use_daem
# Initialize dual-mode adapter
import sys
from pathlib import Path
sys.path.insert(0, str(Path(__file__).parent.parent.parent))
sys.path.insert(0, str(Path(__file__).parent.parent.parent.parent / "cli"))
from utils.dual_mode_wallet_adapter import DualModeWalletAdapter
config = get_config()
@@ -265,7 +265,8 @@ def list(ctx):
# Switch to file mode
from ..config import get_config
import sys
sys.path.insert(0, '/opt/aitbc/cli')
from pathlib import Path
sys.path.insert(0, str(Path(__file__).parent.parent.parent.parent / "cli"))
from utils.dual_mode_wallet_adapter import DualModeWalletAdapter
config = get_config()
adapter = DualModeWalletAdapter(config, use_daemon=False)