improve signed reads, crypto hardening, and scraper transport

This commit is contained in:
k
2026-06-14 21:43:43 +08:00
parent 54884f3e24
commit 78fb63be8e
27 changed files with 1326 additions and 202 deletions
+10
View File
@@ -244,6 +244,16 @@ async def _adopt_locked(wallet_l: str, asset_u: str, mode_n: str) -> AdoptionRes
"no Hyperliquid position to manage. Turn off paper mode in "
"Settings to use /adopt.")
# Macro Vibes (System-2) must be ENABLED to hand a position to the bot.
# /adopt is the entry point to sys2 management, so honouring the
# macro_enabled switch here is what makes that toggle real — otherwise
# a user who turned Macro Vibes OFF could still /adopt and the bot would
# manage it, contradicting their setting.
if not getattr(sub, "macro_enabled", False):
raise AdoptionError("macro_disabled",
"Macro Vibes is turned off for this wallet. Enable Macro Vibes "
"in Settings before using /adopt.")
# System-2 circuit breaker. Same gate the auto-open path used to run:
# if recent losses tripped the sys2 breaker, block new adoptions for
# the lockout window. Otherwise the breaker would be useless under