Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
LiranCohen committed Aug 27, 2024
1 parent 4fabf58 commit 8fd0b06
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
10 changes: 5 additions & 5 deletions packages/agent/src/agent-did-resolver-cache.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { DidResolutionResult, DidResolverCache, DidResolverCacheLevel, DidResolverCacheLevelParams } from "@web5/dids";
import { Web5PlatformAgent } from "./types/agent.js";
import { DidResolutionResult, DidResolverCache, DidResolverCacheLevel, DidResolverCacheLevelParams } from '@web5/dids';
import { Web5PlatformAgent } from './types/agent.js';


export class AgentDidResolverCache extends DidResolverCacheLevel implements DidResolverCache {
Expand All @@ -15,8 +15,8 @@ export class AgentDidResolverCache extends DidResolverCacheLevel implements DidR

get agent() {
if (!this._agent) {
throw new Error("Agent not initialized");
}
throw new Error('Agent not initialized');
}
return this._agent;
}

Check warning on line 21 in packages/agent/src/agent-did-resolver-cache.ts

View check run for this annotation

Codecov / codecov/patch

packages/agent/src/agent-did-resolver-cache.ts#L17-L21

Added lines #L17 - L21 were not covered by tests

Expand All @@ -36,7 +36,7 @@ export class AgentDidResolverCache extends DidResolverCacheLevel implements DidR
if (!result.didResolutionMetadata.error) {
this.set(did, result);
}
}).finally(() => delete this._resolving[did])
}).finally(() => delete this._resolving[did]);
}
else {
delete this._resolving[did];
Expand Down
6 changes: 3 additions & 3 deletions packages/agent/src/did-api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ export interface DidApiParams {

/**
* An optional `AgentDidResolverCache` instance used for caching resolved DID documents.
*
*
* If omitted, the default LevelDB and parameters are used to create a new cache instance.
*/
resolverCache?: DidResolverCache;
Expand Down Expand Up @@ -128,8 +128,8 @@ export class AgentDidApi<TKeyManager extends AgentKeyManager = AgentKeyManager>
this._cache = resolverCache ?? new AgentDidResolverCache({ location: 'DATA/AGENT/DID_CACHE' });

this._resolver = new UniversalResolver({
cache: this._cache,
didResolvers: didMethods
cache : this._cache,
didResolvers : didMethods
});

this._agent = agent;
Expand Down

0 comments on commit 8fd0b06

Please sign in to comment.