cardanoapi / autonomous-agents

Cardano network testing using autonomous agents
https://agents.cardanoapi.io
2 stars 1 forks source link

Fix/My-Agent-Service-Transactions-String-Bug #142

Closed JosephRana11 closed 3 months ago

JosephRana11 commented 3 months ago

Title: Fix Transaction Calculation Error in My-Agent Endpoint

Description: Updated the My-Agent endpoint to handle cases where transactions is a string, avoiding calculation errors. /agent/{agent_id} was working correctly by skipping the transaction calculation, this update was missing in /my-agent

Changes:

Extracted the working part of the code used by /agent/{agent_id} endpoint service and created a separate function. Refactored both endpoints to use this function. Reason:

My-Agent was missing the fix applied to /Agent/{agent id}, causing response errors. Testing:

Confirmed the fix resolves the issue for My-Agent and that /Agent/{agent id} works as expected.