Skip to content

Commit

Permalink
feat: remove storages in AgentServicesProps
Browse files Browse the repository at this point in the history
  • Loading branch information
Sotatek-HocNguyena committed May 8, 2024
1 parent c935c28 commit 9f978c6
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 10 deletions.
2 changes: 1 addition & 1 deletion src/core/agent/records/peerConnectionStorage.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ describe("Connection service of agent", () => {
});

test("Should get all credentials", async () => {
storageService.findAllByQuery.mockResolvedValue([
storageService.getAll.mockResolvedValue([
peerConnectionMetadataRecord,
peerConnectionMetadataRecord2,
]);
Expand Down
9 changes: 0 additions & 9 deletions src/core/agent/services/agentService.ts
Original file line number Diff line number Diff line change
@@ -1,23 +1,14 @@
import { SignifyClient } from "signify-ts";
import { EventService } from "./eventService";
import { IdentifierStorage } from "../records/identifierStorage";
import { CredentialStorage } from "../records/credentialStorage";
import { AgentServicesProps } from "../agent.types";
import { PeerConnectionStorage } from "../records";

abstract class AgentService {
protected readonly signifyClient: SignifyClient;
protected readonly eventService: EventService;
protected readonly identifierStorage: IdentifierStorage;
protected readonly credentialStorage: CredentialStorage;
protected readonly peerConnectionStorage: PeerConnectionStorage;

constructor(agentServicesProps: AgentServicesProps) {
this.signifyClient = agentServicesProps.signifyClient;
this.eventService = agentServicesProps.eventService;
this.identifierStorage = agentServicesProps.identifierStorage;
this.credentialStorage = agentServicesProps.credentialStorage;
this.peerConnectionStorage = agentServicesProps.peerConnectionStorage;
}
}

Expand Down

0 comments on commit 9f978c6

Please sign in to comment.