From cc382f072643918e83c399374bfe5ff77af794e4 Mon Sep 17 00:00:00 2001 From: enes Date: Fri, 11 Oct 2024 16:43:55 +0200 Subject: [PATCH] fix: show error if decrypt fails --- src/pages/sign/index.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/pages/sign/index.tsx b/src/pages/sign/index.tsx index 55276de..dd31938 100644 --- a/src/pages/sign/index.tsx +++ b/src/pages/sign/index.tsx @@ -536,7 +536,11 @@ export const SignPage = () => { setIsLoading(true) const arrayBuffer = await decrypt(selectedFile) - if (!arrayBuffer) return + if (!arrayBuffer) { + setIsLoading(false) + toast.error('Error decrypting file') + return + } handleDecryptedArrayBuffer(arrayBuffer) }