From a1942f8a8dffb11558dcbb900cbeb052e7d0227e Mon Sep 17 00:00:00 2001 From: Ariel Gentile Date: Tue, 10 Oct 2023 11:31:06 -0700 Subject: [PATCH] fix: save AnonCredsCredentialRecord createdAt (#1603) Signed-off-by: Ariel Gentile --- packages/anoncreds/src/repository/AnonCredsCredentialRecord.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/anoncreds/src/repository/AnonCredsCredentialRecord.ts b/packages/anoncreds/src/repository/AnonCredsCredentialRecord.ts index 56657f8993..d9627b6fb3 100644 --- a/packages/anoncreds/src/repository/AnonCredsCredentialRecord.ts +++ b/packages/anoncreds/src/repository/AnonCredsCredentialRecord.ts @@ -5,6 +5,7 @@ import { BaseRecord, utils } from '@aries-framework/core' export interface AnonCredsCredentialRecordProps { id?: string + createdAt?: Date credential: AnonCredsCredential credentialId: string credentialRevocationId?: string @@ -60,6 +61,7 @@ export class AnonCredsCredentialRecord extends BaseRecord< if (props) { this.id = props.id ?? utils.uuid() + this.createdAt = props.createdAt ?? new Date() this.credentialId = props.credentialId this.credential = props.credential this.credentialRevocationId = props.credentialRevocationId