Skip to content

Commit 5d08923

Browse files
committed
refactor: Remove unwanted logic from logging middleware
1 parent 14039cb commit 5d08923

File tree

1 file changed

+0
-17
lines changed

1 file changed

+0
-17
lines changed

src/bot/middlewares/logging.ts

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -107,23 +107,6 @@ async function logging(ctx: BotContext, next: NextFunction): Promise<void> {
107107
});
108108
}
109109

110-
// Pre-checkout and successful payment logging
111-
if (ctx.preCheckoutQuery) {
112-
Object.assign(logData, {
113-
pre_checkout_id: ctx.preCheckoutQuery.id,
114-
currency: ctx.preCheckoutQuery.currency,
115-
total_amount: ctx.preCheckoutQuery.total_amount,
116-
});
117-
}
118-
119-
if (ctx.message?.successful_payment) {
120-
Object.assign(logData, {
121-
payment_currency: ctx.message.successful_payment.currency,
122-
payment_total_amount: ctx.message.successful_payment.total_amount,
123-
payment_payload: ctx.message.successful_payment.invoice_payload,
124-
});
125-
}
126-
127110
// Log the incoming update
128111
logger.info(logData, `User action: ${updateType}`);
129112

0 commit comments

Comments
 (0)