Skip to content

Commit

Permalink
Tenant quick fix - Fixing revocation timestamp missing in tenant (#932)
Browse files Browse the repository at this point in the history
  • Loading branch information
ecamellini authored Aug 22, 2024
1 parent 64207de commit 265222b
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 0 deletions.
6 changes: 6 additions & 0 deletions packages/models/src/tenant/protobufConverterFromV1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,9 @@ export const fromTenantAttributesV1 = (
assignmentTimestamp: bigIntToDate(
certifiedAttribute.assignmentTimestamp
),
revocationTimestamp: bigIntToDate(
certifiedAttribute.revocationTimestamp
),
type: tenantAttributeType.CERTIFIED,
};
case "verifiedAttribute":
Expand All @@ -131,6 +134,9 @@ export const fromTenantAttributesV1 = (
assignmentTimestamp: bigIntToDate(
declaredAttribute.assignmentTimestamp
),
revocationTimestamp: bigIntToDate(
declaredAttribute.revocationTimestamp
),
type: tenantAttributeType.DECLARED,
};
case undefined:
Expand Down
6 changes: 6 additions & 0 deletions packages/models/src/tenant/protobufConverterFromV2.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,9 @@ export const fromTenantAttributesV2 = (
assignmentTimestamp: bigIntToDate(
certifiedAttribute.assignmentTimestamp
),
revocationTimestamp: bigIntToDate(
certifiedAttribute.revocationTimestamp
),
type: tenantAttributeType.CERTIFIED,
};
case "verifiedAttribute":
Expand All @@ -125,6 +128,9 @@ export const fromTenantAttributesV2 = (
assignmentTimestamp: bigIntToDate(
declaredAttribute.assignmentTimestamp
),
revocationTimestamp: bigIntToDate(
declaredAttribute.revocationTimestamp
),
type: tenantAttributeType.DECLARED,
};
default:
Expand Down
1 change: 1 addition & 0 deletions packages/models/src/tenant/protobufConverterToV2.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ export function toAttributeV2(input: TenantAttribute): TenantAttributeV2 {
declaredAttribute: {
id: attribute.id,
assignmentTimestamp: dateToBigInt(attribute.assignmentTimestamp),
revocationTimestamp: dateToBigInt(attribute.revocationTimestamp),
},
},
}))
Expand Down
1 change: 1 addition & 0 deletions packages/tenant-readmodel-writer/test/converterV1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ export function toAttributeV1(input: TenantAttribute): TenantAttributeV1 {
declaredAttribute: {
id: attribute.id,
assignmentTimestamp: dateToBigInt(attribute.assignmentTimestamp),
revocationTimestamp: dateToBigInt(attribute.revocationTimestamp),
},
},
}))
Expand Down

0 comments on commit 265222b

Please sign in to comment.