diff options
Diffstat (limited to 'packages/server/src/helpers/decodeAttestationObject.ts')
-rw-r--r-- | packages/server/src/helpers/decodeAttestationObject.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/packages/server/src/helpers/decodeAttestationObject.ts b/packages/server/src/helpers/decodeAttestationObject.ts index 5385106..bab6ced 100644 --- a/packages/server/src/helpers/decodeAttestationObject.ts +++ b/packages/server/src/helpers/decodeAttestationObject.ts @@ -1,4 +1,4 @@ -import cbor from 'cbor'; +import { decodeCborFirst } from './decodeCbor'; /** * Convert an AttestationObject buffer to a proper object @@ -6,7 +6,7 @@ import cbor from 'cbor'; * @param base64AttestationObject Attestation Object buffer */ export function decodeAttestationObject(attestationObject: Buffer): AttestationObject { - const toCBOR: AttestationObject = cbor.decodeAllSync(attestationObject)[0]; + const toCBOR: AttestationObject = decodeCborFirst(attestationObject); return toCBOR; } |