Skip to content

EVMTrustedUserHandler stores fullMessage but never uses it (doc says it is in the prompt) #12

@thegoodentity

Description

@thegoodentity

Where

examples/agent-api/telegram-trader/src/groups/handlers/evm-trusted-user.ts:

fullMessage: context.text,
},
};
}
async execute(params: ExecuteParams<EVMExecutionContext>): Promise<void> {
const { executionContext, bankrClient } = params;
const prompt = `Buy $${executionContext.amount} of ${executionContext.token.identifier}. Set a limit order to sell it all if price doubles. Set a stop loss to sell it all if price drops by 50%.`;

Problem

The class doc comment says the handler includes full message context in the trade prompt, and decide() stores it:

executionContext: {
  token,
  amount: 0.5,
  fullMessage: context.text,
},

But execute() builds the prompt only from amount and token.identifier, and never references fullMessage:

const prompt = `Buy $${executionContext.amount} of ${executionContext.token.identifier}. Set a limit order to sell it all if price doubles. Set a stop loss to sell it all if price drops by 50%.`;

fullMessage is not read anywhere else in the package, so the documented behavior is not implemented and the field is dead.

Suggested fix

Either include the message context in the prompt to match the doc, or remove the fullMessage field and the comment.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions