Skip to content

Commit

Permalink
fix: fix error filter field with aid grant msg
Browse files Browse the repository at this point in the history
  • Loading branch information
bao-sotatek committed May 8, 2024
1 parent fff8781 commit a57559d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/core/agent/services/ipexCommunicationService.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,7 @@ describe("Ipex communication service of agent", () => {
s: "schemaSaid",
},
i: "i",
d: "d",
},
});
credentialListMock = jest.fn().mockReturnValue({});
Expand All @@ -296,6 +297,7 @@ describe("Ipex communication service of agent", () => {
senderName: "abc123",
recipient: "i",
acdc: expect.anything(),
apply: "d",
});
expect(notificationStorage.deleteById).toBeCalledWith(id);
});
Expand Down
4 changes: 3 additions & 1 deletion src/core/agent/services/ipexCommunicationService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ class IpexCommunicationService extends AgentService {
senderName: holderSignifyName,
recipient: msg.exn.i,
acdc: new Serder(acdc.sad),
apply: msg.exn.d,
});
await this.signifyClient
.ipex()
Expand All @@ -153,7 +154,7 @@ class IpexCommunicationService extends AgentService {
let holderSignifyName;
try {
holderSignifyName = (
await this.identifierStorage.getIdentifierMetadata(msg.exn.a.i)
await this.identifierStorage.getIdentifierMetadata(exnMessage.i)
).signifyName;
} catch (error) {
const identifierHolder = await this.getIdentifierById(msg.exn.a.i);
Expand Down Expand Up @@ -226,6 +227,7 @@ class IpexCommunicationService extends AgentService {
IpexCommunicationService.CREDENTIAL_MISSING_METADATA_ERROR_MSG
);
}
// @TODO - bao-sotatek: This needs to be refined into a proper type once the UI has been decided. Also should potentially skip over missing credentials instead of throwing.
return { ...getCredentialShortDetails(metadata), acdc: cred };
})
);
Expand Down

0 comments on commit a57559d

Please sign in to comment.