forked from syntaxbullet/AuroraBot-discord
chore: Remove unnecessary comments from profile command, trade interaction handler, inventory service, and scheduler.
This commit is contained in:
@@ -120,13 +120,6 @@ export const inventoryService = {
|
||||
// Deduct Balance using economy service (passing tx ensures atomicity)
|
||||
await economyService.modifyUserBalance(userId, -totalPrice, 'PURCHASE', `Bought ${quantity}x ${item.name}`, txFn);
|
||||
|
||||
// Add Item (using local logic to keep in same tx, or could refactor addItem to take tx too and call it)
|
||||
// Let's refactor addItem below to accept tx, then call it here?
|
||||
// Since we are modifying buyItem, we can just inline the item addition or call addItem if we update it.
|
||||
// Let's assume we update addItem next. For now, inline the add logic but cleaner.
|
||||
|
||||
// Add Item using inner logic or self-call if we refactor properly.
|
||||
// Calling addItem directly within the same transaction scope:
|
||||
await inventoryService.addItem(userId, itemId, quantity, txFn);
|
||||
|
||||
return { success: true, item, totalPrice };
|
||||
|
||||
Reference in New Issue
Block a user