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