fix: Correct price_change field fallback logic

Was returning 'N/A' incorrectly when token_price_change_24h was missing.
Now properly checks: price_change_24h OR token_price_change_24h OR 'N/A'
This commit is contained in:
shokollm
2026-04-14 00:37:48 +00:00
parent bb62e53093
commit 7a64632a63

View File

@@ -769,7 +769,7 @@ class ConversationalAgent:
symbol = t.get("symbol", "") symbol = t.get("symbol", "")
name = t.get("name", "") name = t.get("name", "")
# Search API uses price_change_24h, trending uses token_price_change_24h # Search API uses price_change_24h, trending uses token_price_change_24h
price_change = t.get("price_change_24h") or t.get("token_price_change_24h", "N/A") price_change = t.get("price_change_24h") or t.get("token_price_change_24h") or "N/A"
mc = t.get("market_cap", "N/A") mc = t.get("market_cap", "N/A")
# Store for context # Store for context
if addr and symbol: if addr and symbol: