issue-25 #42

Merged
s merged 12 commits from issue-25 into main 2024-05-16 06:45:59 +00:00
Showing only changes of commit 05c3f49a17 - Show all commits

View File

@ -51,7 +51,7 @@ enum SignedStatus {
}
export const SignPage = () => {
const [searchParams] = useSearchParams()
const [searchParams, setSearchParams] = useSearchParams()
const [displayInput, setDisplayInput] = useState(false)
@ -123,7 +123,7 @@ export const SignPage = () => {
const fileName = fileUrl.split('/').pop()
const file = new File([res.data], fileName!)
decrypt(file, key).then((arrayBuffer) => {
decrypt(file, decodeURIComponent(key)).then((arrayBuffer) => {
if (arrayBuffer) handleDecryptedArrayBuffer(arrayBuffer)
})
})
@ -376,6 +376,14 @@ export const SignPage = () => {
setAuthUrl
)
}
// when user is the last signer and has sent
// the final document to all the signers and viewers
// update search params with updated file url and encryption key
setSearchParams({
file: fileUrl,
key: encryptionKey
})
} else {
const nextSigner = meta.signers[signerIndex + 1]
await sendDM(