fix: wire quest progress tracking for transfer, daily, trivia, and exam events
Some checks failed
Deploy to Production / test (push) Failing after 31s
Some checks failed
Deploy to Production / test (push) Failing after 31s
These domain events were only connected to dashboard recording but never called questService.handleEvent(), so quests with triggers TRANSFER_OUT, DAILY_REWARD, TRIVIA_WIN, and EXAM_REWARD never tracked progress. Added userId and tx to event payloads and switched from emit to emitAsync for transaction atomicity. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -53,9 +53,9 @@ export interface DomainEventPayloads {
|
||||
[EVENTS.DOMAIN.XP_GAINED]: { userId: string; amount: number; tx: Transaction };
|
||||
[EVENTS.DOMAIN.ITEM_COLLECTED]: { userId: string; itemId: number; quantity: number; tx: Transaction };
|
||||
[EVENTS.DOMAIN.ITEM_USED]: { userId: string; itemId: number; tx: Transaction };
|
||||
[EVENTS.DOMAIN.TRANSFER_COMPLETED]: { username: string; amount: bigint; toUserId: string };
|
||||
[EVENTS.DOMAIN.DAILY_CLAIMED]: { username: string; amount: bigint };
|
||||
[EVENTS.DOMAIN.TRANSFER_COMPLETED]: { userId: string; username: string; amount: bigint; toUserId: string; tx: Transaction };
|
||||
[EVENTS.DOMAIN.DAILY_CLAIMED]: { userId: string; username: string; amount: bigint; tx: Transaction };
|
||||
[EVENTS.DOMAIN.TRIVIA_STARTED]: { username: string; difficulty: string };
|
||||
[EVENTS.DOMAIN.TRIVIA_WON]: { username: string | undefined; reward: bigint };
|
||||
[EVENTS.DOMAIN.EXAM_PASSED]: { username: string; reward: bigint };
|
||||
[EVENTS.DOMAIN.TRIVIA_WON]: { userId: string; username: string | undefined; reward: bigint; tx: Transaction };
|
||||
[EVENTS.DOMAIN.EXAM_PASSED]: { userId: string; username: string; reward: bigint; tx: Transaction };
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user