From 245585662a094da385702438bcdd72387cd5267f Mon Sep 17 00:00:00 2001 From: Stixx Date: Tue, 10 Dec 2024 14:46:26 +0100 Subject: [PATCH] fix: removed redundant variable --- src/pages/sign/index.tsx | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/src/pages/sign/index.tsx b/src/pages/sign/index.tsx index 16fa3c4..2c69adf 100644 --- a/src/pages/sign/index.tsx +++ b/src/pages/sign/index.tsx @@ -12,42 +12,40 @@ import { NostrController } from '../../controllers' import { appPrivateRoutes, appPublicRoutes } from '../../routes' import { CreateSignatureEventContent, Meta, SignedEvent } from '../../types' import { + ARRAY_BUFFER, decryptArrayBuffer, + DEFLATE, encryptArrayBuffer, extractMarksFromSignedMeta, extractZipUrlAndEncryptionKey, + filterMarksByPubkey, + findOtherUserMarks, generateEncryptionKey, generateKeysFile, getCurrentUserFiles, + getCurrentUserMarks, getHash, hexToNpub, isOnline, loadZip, - unixNow, npubToHex, parseJson, + processMarks, readContentOfZipEntry, sendNotification, signEventForMetaFile, - updateUsersAppData, - findOtherUserMarks, timeout, - processMarks, - ARRAY_BUFFER + unixNow, + updateMarks, + updateUsersAppData } from '../../utils' import { CurrentUserMark, Mark } from '../../types/mark.ts' -import { - filterMarksByPubkey, - getCurrentUserMarks, - updateMarks -} from '../../utils' import PdfMarking from '../../components/PDFView/PdfMarking.tsx' import { convertToSigitFile, getZipWithFiles, SigitFile } from '../../utils/file.ts' -import { DEFLATE } from '../../utils' import { generateTimestamp } from '../../utils/opentimestamps.ts' import { MARK_TYPE_CONFIG } from '../../components/MarkTypeStrategy/MarkStrategy.tsx' import { getLastSignersSig } from '../../utils/sign.ts' @@ -195,11 +193,10 @@ export const SignPage = () => { m.value && encryptionKey ) { - const decrypted = await fetchAndDecrypt( + otherUserMarks[i].value = await fetchAndDecrypt( m.value, encryptionKey ) - otherUserMarks[i].value = decrypted } } catch (error) { console.error(`Error during mark fetchAndDecrypt phase`, error)