diff --git a/src/components/DisplaySigit/index.tsx b/src/components/DisplaySigit/index.tsx index 93cbc77..5147b45 100644 --- a/src/components/DisplaySigit/index.tsx +++ b/src/components/DisplaySigit/index.tsx @@ -47,12 +47,12 @@ export const DisplaySigit = ({ const { extensions, isSame } = extractFileExtensions(Object.keys(fileHashes)) const currentUserNpub: string = usersPubkey ? hexToNpub(usersPubkey) : '' - const currentUserSigned = - signersStatus[currentUserNpub as `npub1${string}`] === SignStatus.Signed + const currentUserNextSigner = + signersStatus[currentUserNpub as `npub1${string}`] === SignStatus.Awaiting return (
- {signedStatus === SigitStatus.Complete || currentUserSigned ? ( + {signedStatus === SigitStatus.Complete || !currentUserNextSigner ? ( { toast.error('Failed to publish notifications') }) - navigate(appPrivateRoutes.sign, { state: { meta } }) + const isFirstSigner = signers[0].pubkey === usersPubkey + + if (isFirstSigner) { + navigate(appPrivateRoutes.sign, { state: { meta } }) + } else { + const createSignatureJson = JSON.parse(createSignature) + navigate(`${appPublicRoutes.verify}/${createSignatureJson.id}`) + } } else { const zip = new JSZip()