Skip to content

Commit

Permalink
fix: removed timestamp from the in memory revocation status list
Browse files Browse the repository at this point in the history
Signed-off-by: Berend Sliedrecht <sliedrecht@berend.io>
  • Loading branch information
berendsliedrecht committed Jan 17, 2024
1 parent 6f011ad commit becd233
Showing 1 changed file with 8 additions and 10 deletions.
18 changes: 8 additions & 10 deletions packages/anoncreds/tests/InMemoryAnonCredsRegistry.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* eslint-disable @typescript-eslint/no-unused-vars */
import type {
AnonCredsRegistry,
GetSchemaReturn,
Expand Down Expand Up @@ -71,7 +70,7 @@ export class InMemoryAnonCredsRegistry implements AnonCredsRegistry {
this.revocationStatusLists = existingRevocationStatusLists
}

public async getSchema(agentContext: AgentContext, schemaId: string): Promise<GetSchemaReturn> {
public async getSchema(_agentContext: AgentContext, schemaId: string): Promise<GetSchemaReturn> {
const schema = this.schemas[schemaId]

const parsed = parseIndySchemaId(schemaId)
Expand Down Expand Up @@ -103,7 +102,7 @@ export class InMemoryAnonCredsRegistry implements AnonCredsRegistry {
}

public async registerSchema(
agentContext: AgentContext,
_agentContext: AgentContext,
options: RegisterSchemaOptions
): Promise<RegisterSchemaReturn> {
const { namespace, namespaceIdentifier } = parseIndyDid(options.schema.issuerId)
Expand Down Expand Up @@ -140,7 +139,7 @@ export class InMemoryAnonCredsRegistry implements AnonCredsRegistry {
}

public async getCredentialDefinition(
agentContext: AgentContext,
_agentContext: AgentContext,
credentialDefinitionId: string
): Promise<GetCredentialDefinitionReturn> {
const credentialDefinition = this.credentialDefinitions[credentialDefinitionId]
Expand All @@ -165,7 +164,7 @@ export class InMemoryAnonCredsRegistry implements AnonCredsRegistry {
}

public async registerCredentialDefinition(
agentContext: AgentContext,
_agentContext: AgentContext,
options: RegisterCredentialDefinitionOptions
): Promise<RegisterCredentialDefinitionReturn> {
const parsedSchema = parseIndySchemaId(options.credentialDefinition.schemaId)
Expand Down Expand Up @@ -211,7 +210,7 @@ export class InMemoryAnonCredsRegistry implements AnonCredsRegistry {
}

public async getRevocationRegistryDefinition(
agentContext: AgentContext,
_agentContext: AgentContext,
revocationRegistryDefinitionId: string
): Promise<GetRevocationRegistryDefinitionReturn> {
const revocationRegistryDefinition = this.revocationRegistryDefinitions[revocationRegistryDefinitionId]
Expand All @@ -236,7 +235,7 @@ export class InMemoryAnonCredsRegistry implements AnonCredsRegistry {
}

public async registerRevocationRegistryDefinition(
agentContext: AgentContext,
_agentContext: AgentContext,
options: RegisterRevocationRegistryDefinitionOptions
): Promise<RegisterRevocationRegistryDefinitionReturn> {
const parsedCredentialDefinition = parseIndyCredentialDefinitionId(options.revocationRegistryDefinition.credDefId)
Expand Down Expand Up @@ -284,7 +283,7 @@ export class InMemoryAnonCredsRegistry implements AnonCredsRegistry {
}

public async getRevocationStatusList(
agentContext: AgentContext,
_agentContext: AgentContext,
revocationRegistryId: string,
timestamp: number
): Promise<GetRevocationStatusListReturn> {
Expand Down Expand Up @@ -322,7 +321,7 @@ export class InMemoryAnonCredsRegistry implements AnonCredsRegistry {
}

public async registerRevocationStatusList(
agentContext: AgentContext,
_agentContext: AgentContext,
options: RegisterRevocationStatusListOptions
): Promise<RegisterRevocationStatusListReturn> {
const timestamp = (options.options.timestamp as number) ?? dateToTimestamp(new Date())
Expand All @@ -341,7 +340,6 @@ export class InMemoryAnonCredsRegistry implements AnonCredsRegistry {
revocationStatusListState: {
state: 'finished',
revocationStatusList,
timestamp: timestamp.toString(),
},
}
}
Expand Down

0 comments on commit becd233

Please sign in to comment.