From 92fa06db9d48f5a6c4f6c058103126a2a3fbc783 Mon Sep 17 00:00:00 2001 From: Ian Krieger Date: Thu, 14 Sep 2023 16:01:57 -0400 Subject: [PATCH] fix: only modify file if we have private key --- src/user/reporting/csv.library.tsx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/user/reporting/csv.library.tsx b/src/user/reporting/csv.library.tsx index 0f97fa993..cf6a95ab7 100644 --- a/src/user/reporting/csv.library.tsx +++ b/src/user/reporting/csv.library.tsx @@ -73,6 +73,10 @@ async function transformConversionEnvelope( blob: Blob, privateKey?: string, ): Promise { + if (!privateKey) { + return Promise.resolve(blob); + } + const te = new TextEncoder(); const td = new TextDecoder(); const ui8a = (s: string) => Uint8Array.from(atob(s), (c) => c.charCodeAt(0));