diff --git a/packages/client-coinbase/src/index.ts b/packages/client-coinbase/src/index.ts index 64161f56a5d..88cd68aa87e 100644 --- a/packages/client-coinbase/src/index.ts +++ b/packages/client-coinbase/src/index.ts @@ -228,8 +228,8 @@ Generate only the tweet text, no commentary or markdown.`; // Execute token swap const buy = event.event.toUpperCase() === 'BUY'; - const amountInUSD = buy ? amount : amount / Number(event.price); - const txHash = await this.executeTokenSwap(event, amountInUSD, buy); + const amountInCurrency = buy ? amount : amount / Number(event.price); + const txHash = await this.executeTokenSwap(event, amountInCurrency, buy); if (txHash == null) { elizaLogger.error('txHash is null'); return; @@ -241,7 +241,7 @@ Generate only the tweet text, no commentary or markdown.`; elizaLogger.info('pnl ', pnl); // Generate and post tweet - await this.handleTweetPosting(event, amountInUSD, pnl, formattedTimestamp, state, txHash); + await this.handleTweetPosting(event, amount, pnl, formattedTimestamp, state, txHash); } private async setupRoom(roomId: UUID) {