feat: 接入天河链延时确认
This commit is contained in:
@@ -61,7 +61,19 @@ export class AttestationService {
|
||||
if (!proof) throw new BusinessException(ErrorCode.NOT_FOUND, '存证记录不存在', 404);
|
||||
await this.prisma.blockchainProof.update({
|
||||
where: { id: proofId },
|
||||
data: { status: ProofStatus.PENDING, onchainAt: null },
|
||||
data: {
|
||||
status: ProofStatus.PENDING,
|
||||
txHash: null,
|
||||
blockHash: null,
|
||||
blockHeight: null,
|
||||
chainName: null,
|
||||
explorerUrl: null,
|
||||
onchainAt: null,
|
||||
rawResponse: {
|
||||
...(proof.rawResponse && typeof proof.rawResponse === 'object' ? (proof.rawResponse as object) : {}),
|
||||
retriedAt: new Date().toISOString(),
|
||||
},
|
||||
},
|
||||
});
|
||||
await this.queue.add('onchain', { proofId });
|
||||
return { success: true };
|
||||
|
||||
Reference in New Issue
Block a user