fix: If creator is not the first signer we should not redirect to /sign page

This commit is contained in:
Stixx 2024-12-24 10:58:29 +01:00
parent ae3d461661
commit ee3e0e1bb1

View File

@ -25,7 +25,7 @@ import {
NostrController, NostrController,
RelayController RelayController
} from '../../controllers' } from '../../controllers'
import { appPrivateRoutes } from '../../routes' import { appPrivateRoutes, appPublicRoutes } from '../../routes'
import { import {
CreateSignatureEventContent, CreateSignatureEventContent,
KeyboardCode, KeyboardCode,
@ -925,7 +925,14 @@ export const CreatePage = () => {
toast.error('Failed to publish notifications') 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 { } else {
const zip = new JSZip() const zip = new JSZip()