mirror of
https://github.com/selfxyz/self.git
synced 2026-04-05 03:00:53 -04:00
add try/catch statement around getDgPaddingBytes
This commit is contained in:
@@ -96,7 +96,12 @@ export function parsePassportData(passportData: PassportData): PassportMetadata
|
||||
|
||||
const dg1HashFunction = dg1HashInfo?.hashFunction || 'unknown';
|
||||
const dg1HashOffset = dg1HashInfo?.offset || 0;
|
||||
const dgPaddingBytes = getDgPaddingBytes(passportData, dg1HashFunction);
|
||||
let dgPaddingBytes = -1;
|
||||
try {
|
||||
dgPaddingBytes = getDgPaddingBytes(passportData, dg1HashFunction);
|
||||
} catch (error) {
|
||||
console.error('Error getting DG padding bytes:', error);
|
||||
}
|
||||
const { hashFunction: eContentHashFunction, offset: eContentHashOffset } = findHashSizeOfEContent(
|
||||
passportData.eContent,
|
||||
passportData.signedAttr
|
||||
|
||||
Reference in New Issue
Block a user