Skip to content

Commit

Permalink
fix: Returning newMessage sender & receiver
Browse files Browse the repository at this point in the history
  • Loading branch information
simonas-notcat committed Mar 16, 2020
1 parent 8c23e13 commit 72bfb60
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions packages/daf-core/src/graphql/graphql-core.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion packages/daf-data-store/src/data-store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 72bfb60

Please sign in to comment.