fix(identity-service): 修复手动重试钱包生成使用错误的事件类型
retryWalletGeneration 方法之前使用 createWalletGenerationEvent() 发布 UserAccountCreatedEvent,但 MPC 服务只监听 MpcKeygenRequestedEvent。 现在改为直接发布 MpcKeygenRequestedEvent,与 wallet-retry.task.ts 保持一致。 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
9153ba3625
commit
339f95f7ed
|
|
@ -1878,12 +1878,22 @@ export class UserApplicationService {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 4. 重新触发钱包生成流程
|
// 4. 重新触发钱包生成流程 - 使用 MpcKeygenRequestedEvent(MPC服务只监听此事件)
|
||||||
const event = account.createWalletGenerationEvent();
|
const sessionId = crypto.randomUUID();
|
||||||
await this.eventPublisher.publish(event);
|
await this.eventPublisher.publish(
|
||||||
|
new MpcKeygenRequestedEvent({
|
||||||
|
sessionId,
|
||||||
|
userId: account.userId.toString(),
|
||||||
|
accountSequence: account.accountSequence.value,
|
||||||
|
username: `user_${account.accountSequence.value}`,
|
||||||
|
threshold: 2,
|
||||||
|
totalParties: 3,
|
||||||
|
requireDelegate: true,
|
||||||
|
}),
|
||||||
|
);
|
||||||
|
|
||||||
this.logger.log(
|
this.logger.log(
|
||||||
`[WALLET-RETRY] Wallet generation retry triggered for user: ${userId}`,
|
`[WALLET-RETRY] Wallet generation retry triggered for user: ${userId}, sessionId=${sessionId}`,
|
||||||
);
|
);
|
||||||
|
|
||||||
// 5. 更新 Redis 状态为 pending(等待重新生成)
|
// 5. 更新 Redis 状态为 pending(等待重新生成)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue