feat: Sign Directly From the Marking Screen fix: Marking inputs glitches, losing values #272
@ -12,42 +12,40 @@ import { NostrController } from '../../controllers'
|
|||||||
import { appPrivateRoutes, appPublicRoutes } from '../../routes'
|
import { appPrivateRoutes, appPublicRoutes } from '../../routes'
|
||||||
import { CreateSignatureEventContent, Meta, SignedEvent } from '../../types'
|
import { CreateSignatureEventContent, Meta, SignedEvent } from '../../types'
|
||||||
import {
|
import {
|
||||||
|
ARRAY_BUFFER,
|
||||||
decryptArrayBuffer,
|
decryptArrayBuffer,
|
||||||
|
DEFLATE,
|
||||||
encryptArrayBuffer,
|
encryptArrayBuffer,
|
||||||
extractMarksFromSignedMeta,
|
extractMarksFromSignedMeta,
|
||||||
extractZipUrlAndEncryptionKey,
|
extractZipUrlAndEncryptionKey,
|
||||||
|
filterMarksByPubkey,
|
||||||
|
findOtherUserMarks,
|
||||||
generateEncryptionKey,
|
generateEncryptionKey,
|
||||||
generateKeysFile,
|
generateKeysFile,
|
||||||
getCurrentUserFiles,
|
getCurrentUserFiles,
|
||||||
|
getCurrentUserMarks,
|
||||||
getHash,
|
getHash,
|
||||||
hexToNpub,
|
hexToNpub,
|
||||||
isOnline,
|
isOnline,
|
||||||
loadZip,
|
loadZip,
|
||||||
unixNow,
|
|
||||||
npubToHex,
|
npubToHex,
|
||||||
parseJson,
|
parseJson,
|
||||||
|
processMarks,
|
||||||
readContentOfZipEntry,
|
readContentOfZipEntry,
|
||||||
sendNotification,
|
sendNotification,
|
||||||
signEventForMetaFile,
|
signEventForMetaFile,
|
||||||
updateUsersAppData,
|
|
||||||
findOtherUserMarks,
|
|
||||||
timeout,
|
timeout,
|
||||||
processMarks,
|
unixNow,
|
||||||
ARRAY_BUFFER
|
updateMarks,
|
||||||
|
updateUsersAppData
|
||||||
} from '../../utils'
|
} from '../../utils'
|
||||||
import { CurrentUserMark, Mark } from '../../types/mark.ts'
|
import { CurrentUserMark, Mark } from '../../types/mark.ts'
|
||||||
import {
|
|
||||||
filterMarksByPubkey,
|
|
||||||
getCurrentUserMarks,
|
|
||||||
updateMarks
|
|
||||||
} from '../../utils'
|
|
||||||
import PdfMarking from '../../components/PDFView/PdfMarking.tsx'
|
import PdfMarking from '../../components/PDFView/PdfMarking.tsx'
|
||||||
import {
|
import {
|
||||||
convertToSigitFile,
|
convertToSigitFile,
|
||||||
getZipWithFiles,
|
getZipWithFiles,
|
||||||
SigitFile
|
SigitFile
|
||||||
} from '../../utils/file.ts'
|
} from '../../utils/file.ts'
|
||||||
import { DEFLATE } from '../../utils'
|
|
||||||
import { generateTimestamp } from '../../utils/opentimestamps.ts'
|
import { generateTimestamp } from '../../utils/opentimestamps.ts'
|
||||||
import { MARK_TYPE_CONFIG } from '../../components/MarkTypeStrategy/MarkStrategy.tsx'
|
import { MARK_TYPE_CONFIG } from '../../components/MarkTypeStrategy/MarkStrategy.tsx'
|
||||||
import { getLastSignersSig } from '../../utils/sign.ts'
|
import { getLastSignersSig } from '../../utils/sign.ts'
|
||||||
@ -195,11 +193,10 @@ export const SignPage = () => {
|
|||||||
m.value &&
|
m.value &&
|
||||||
encryptionKey
|
encryptionKey
|
||||||
) {
|
) {
|
||||||
const decrypted = await fetchAndDecrypt(
|
otherUserMarks[i].value = await fetchAndDecrypt(
|
||||||
m.value,
|
m.value,
|
||||||
encryptionKey
|
encryptionKey
|
||||||
)
|
)
|
||||||
otherUserMarks[i].value = decrypted
|
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error(`Error during mark fetchAndDecrypt phase`, error)
|
console.error(`Error during mark fetchAndDecrypt phase`, error)
|
||||||
|
Loading…
Reference in New Issue
Block a user