diff --git a/packages/daf-core/src/graphql/graphql-core.ts b/packages/daf-core/src/graphql/graphql-core.ts index ef4163f44..172d83ddf 100644 --- a/packages/daf-core/src/graphql/graphql-core.ts +++ b/packages/daf-core/src/graphql/graphql-core.ts @@ -24,6 +24,8 @@ const newMessage = async ( const res = { ...message, + sender: message.from, + receiver: message.to, data: JSON.stringify(message.data), id: message.id, raw: message.raw, diff --git a/packages/daf-data-store/src/data-store.ts b/packages/daf-data-store/src/data-store.ts index c13624b21..d380b5f60 100644 --- a/packages/daf-data-store/src/data-store.ts +++ b/packages/daf-data-store/src/data-store.ts @@ -33,7 +33,7 @@ export class DataStore { relations: ['credentials', 'credentials.issuer', 'credentials.subject'], }) - return message.credentials.map(this.credentialToLegacyFormat) + return message?.credentials.map(this.credentialToLegacyFormat) } async credentialsFieldsForClaimHash(hash: string) {