fix: Also fix price_change field in AI tool execution path

There was duplicate code handling search_tokens in the AI tool calling section.
This commit is contained in:
shokollm
2026-04-14 01:43:30 +00:00
parent 7a64632a63
commit 2d125ede22

View File

@@ -1376,9 +1376,8 @@ class ConversationalAgent:
addr = t.get("token", "")
symbol = t.get("symbol", "")
name = t.get("name", "")
price_change = t.get(
"token_price_change_24h", "N/A"
)
# 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") or "N/A"
mc = t.get("market_cap", "N/A")
try:
mc_str = f"${float(mc):,.0f}"