mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-10-20 05:15:31 +00:00
fix(wallet): auto-unlock keystore in wallet runtime for CLI/headless use
get_runtime() now calls ensure_unlocked(interactive=False) when the keystore is initialized but locked, so HERMES_KEYSTORE_PASSPHRASE and credential-store-cached passphrases work for wallet CLI commands without requiring a separate unlock step. Found during Linux sandbox testing where 'hermes wallet status' failed with KeystoreLocked despite the env var being set.
This commit is contained in:
parent
4f419585b1
commit
24852c6789
1 changed files with 5 additions and 1 deletions
|
|
@ -63,7 +63,11 @@ def get_runtime():
|
|||
|
||||
ks = get_keystore()
|
||||
if not ks.is_unlocked:
|
||||
return None, None
|
||||
try:
|
||||
if not ks.ensure_unlocked(interactive=False):
|
||||
return None, None
|
||||
except Exception:
|
||||
return None, None
|
||||
|
||||
mgr = WalletManager(ks, state_dir=_wallet_state_dir())
|
||||
wallet_cfg = _load_wallet_config()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue