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.
Where
examples/agent-api/telegram-trader/src/groups/handlers/evm-trusted-user.ts:bankr-api-examples/examples/agent-api/telegram-trader/src/groups/handlers/evm-trusted-user.ts
Lines 60 to 68 in 7b20299
Problem
The class doc comment says the handler includes full message context in the trade prompt, and
decide()stores it:But
execute()builds the prompt only fromamountandtoken.identifier, and never referencesfullMessage:fullMessageis 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
fullMessagefield and the comment.