fix: convert entry_time datetime to timestamp in grace period calculation

TypeError: unsupported operand type(s) for -: 'float' and 'datetime.datetime'

Line 1462: time.time() - guard.entry_time
Fixed to: time.time() - guard.entry_time.timestamp()

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
GifariKemal
2026-02-11 18:18:43 +07:00
parent 0f9548e5fb
commit 1bb4111724
+1 -1
View File
@@ -1459,7 +1459,7 @@ class SmartRiskManager:
"normal": 90,
}.get(regime, 90)
time_since_entry = time.time() - guard.entry_time
time_since_entry = time.time() - guard.entry_time.timestamp()
in_grace_period = time_since_entry < grace_period_sec
# Lower threshold for losses (75%)