Skip to content

Commit

Permalink
Little workaround to parse unusual OCMF and Alfen transparency data
Browse files Browse the repository at this point in the history
  • Loading branch information
ahzf committed Sep 22, 2024
1 parent fbf9d36 commit f59570a
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/ts/chargy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -462,13 +462,19 @@ export class Chargy {
else if (textContent?.startsWith("OCMF"))
processedFile.result = await new OCMF(this).TryToParseOCMFDocument(textContent);

else if (textContent?.startsWith("\"OCMF") && textContent?.endsWith("\""))
processedFile.result = await new OCMF(this).TryToParseOCMFDocument(textContent.substring(1, textContent.length - 1));

//#endregion

//#region ALFEN processing

else if (textContent?.startsWith("AP;"))
processedFile.result = await new Alfen(this).TryToParseALFENFormat(textContent, {});

else if (textContent?.startsWith("\"AP;") && textContent?.endsWith("\""))
processedFile.result = await new Alfen(this).TryToParseALFENFormat(textContent.substring(1, textContent.length - 1), {});

//#endregion

//#region Public key processing (PEM format)
Expand Down

0 comments on commit f59570a

Please sign in to comment.