Skip to content

Commit

Permalink
fix: date only
Browse files Browse the repository at this point in the history
Signed-off-by: Timo Glastra <[email protected]>
  • Loading branch information
TimoGlastra committed Oct 30, 2024
1 parent 12610b7 commit 8b03d1d
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 4 deletions.
3 changes: 2 additions & 1 deletion agent/src/issuers/infrastruktur.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@ import {
OpenId4VciCredentialFormatProfile,
type OpenId4VciCredentialSupportedWithId,
} from '@credo-ts/openid4vc'
import { DateOnly } from '@protokoll/mdoc-client/dist/cjs/src/cbor'

import { AGENT_HOST } from '../constants'
import type { CredentialDisplay, StaticMdocSignInput, StaticSdJwtSignInput } from '../types'
import {
DateOnly,
dateToSeconds,
oneYearInMilliseconds,
serverStartupTimeInMilliseconds,
Expand Down
3 changes: 2 additions & 1 deletion agent/src/issuers/koln.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@ import {
OpenId4VciCredentialFormatProfile,
type OpenId4VciCredentialSupportedWithId,
} from '@credo-ts/openid4vc'
import { DateOnly } from '@protokoll/mdoc-client/dist/cjs/src/cbor/index'

import { AGENT_HOST } from '../constants'
import type { CredentialDisplay, StaticMdocSignInput, StaticSdJwtSignInput } from '../types'
import {
DateOnly,
dateToSeconds,
oneYearInMilliseconds,
serverStartupTimeInMilliseconds,
Expand Down
2 changes: 1 addition & 1 deletion agent/src/issuers/steuern.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ import {
OpenId4VciCredentialFormatProfile,
type OpenId4VciCredentialSupportedWithId,
} from '@credo-ts/openid4vc'
import { DateOnly } from '@protokoll/mdoc-client/dist/cjs/src/cbor'
import { AGENT_HOST } from '../constants'
import type { CredentialDisplay, StaticMdocSignInput, StaticSdJwtSignInput } from '../types'
import {
DateOnly,
dateToSeconds,
oneYearInMilliseconds,
serverStartupTimeInMilliseconds,
Expand Down
2 changes: 1 addition & 1 deletion agent/src/issuers/techniker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ import {
OpenId4VciCredentialFormatProfile,
type OpenId4VciCredentialSupportedWithId,
} from '@credo-ts/openid4vc'
import { DateOnly } from '@protokoll/mdoc-client/dist/cjs/src/cbor'
import { AGENT_HOST } from '../constants'
import type { CredentialDisplay, StaticMdocSignInput, StaticSdJwtSignInput } from '../types'
import {
DateOnly,
dateToSeconds,
oneYearInMilliseconds,
serverStartupTimeInMilliseconds,
Expand Down
5 changes: 5 additions & 0 deletions agent/src/utils/date.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
// FIXME: export is broken, need update in protokol
// import { DateOnly as NativeDateOnly } from '@protokoll/mdoc-client/dist/cjs/src/cbor'
// export const DateOnly = NativeDateOnly
export const DateOnly = Date

export const oneDayInMilliseconds = 24 * 60 * 60 * 1000
export const tenDaysInMilliseconds = 10 * oneDayInMilliseconds
export const oneYearInMilliseconds = 365 * oneDayInMilliseconds
Expand Down

0 comments on commit 8b03d1d

Please sign in to comment.