fix: zipUrls

This commit is contained in:
Stixx 2025-01-02 10:49:08 +01:00
parent 6dab22a495
commit cc2b6fa124
2 changed files with 6 additions and 4 deletions

View File

@ -167,6 +167,7 @@ export const SignPage = () => {
createSignatureContent.markConfig, createSignatureContent.markConfig,
usersPubkey! usersPubkey!
) )
// TODO figure out why markConfig does not contain the usersPubkey when multiple signer
const signedMarks = extractMarksFromSignedMeta(meta) const signedMarks = extractMarksFromSignedMeta(meta)
const currentUserMarks = getCurrentUserMarks(metaMarks, signedMarks) const currentUserMarks = getCurrentUserMarks(metaMarks, signedMarks)
const otherUserMarks = findOtherUserMarks(signedMarks, usersPubkey!) const otherUserMarks = findOtherUserMarks(signedMarks, usersPubkey!)

View File

@ -408,7 +408,7 @@ export const VerifyPage = () => {
setLoadingSpinnerDesc('Fetching file from file server') setLoadingSpinnerDesc('Fetching file from file server')
for (let i = 0; i < zipUrls.length; i++) { for (let i = 0; i < zipUrls.length; i++) {
const zipUrl = '' const zipUrl = zipUrls[i]
const isLastZipUrl = i === zipUrls.length - 1 const isLastZipUrl = i === zipUrls.length - 1
try { try {
@ -427,10 +427,11 @@ export const VerifyPage = () => {
encryptedArrayBuffer, encryptedArrayBuffer,
encryptionKey encryptionKey
).catch((err) => { ).catch((err) => {
const error = err.message
? `Decryption error: ${err.message}`
: 'An error occurred in decrypting file.'
console.error('Error in decryption:>> ', err) console.error('Error in decryption:>> ', err)
toast.error( toast.error(error)
err.message || 'An error occurred in decrypting file.'
)
return null // Continue iteration for next zipUrl return null // Continue iteration for next zipUrl
}) })