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.
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.