feat: implement real-time dashboard updates via WebSockets
This commit is contained in:
@@ -61,6 +61,14 @@ export const economyService = {
|
||||
description: `Transfer from ${fromUserId}`,
|
||||
});
|
||||
|
||||
// Record dashboard event
|
||||
const { dashboardService } = await import("@shared/modules/dashboard/dashboard.service");
|
||||
dashboardService.recordEvent({
|
||||
type: 'info',
|
||||
message: `${sender.username} transferred ${amount.toLocaleString()} AU to User ID ${toUserId}`,
|
||||
icon: '💸'
|
||||
});
|
||||
|
||||
return { success: true, amount };
|
||||
}, tx);
|
||||
},
|
||||
@@ -149,6 +157,14 @@ export const economyService = {
|
||||
description: `Daily reward (Streak: ${streak})`,
|
||||
});
|
||||
|
||||
// Record dashboard event
|
||||
const { dashboardService } = await import("@shared/modules/dashboard/dashboard.service");
|
||||
dashboardService.recordEvent({
|
||||
type: 'success',
|
||||
message: `${user.username} claimed daily reward: ${totalReward.toLocaleString()} AU`,
|
||||
icon: '☀️'
|
||||
});
|
||||
|
||||
return { claimed: true, amount: totalReward, streak, nextReadyAt, isWeekly: isWeeklyCurrent, weeklyBonus: weeklyBonusAmount };
|
||||
}, tx);
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user