Fix connect modal without pending request id

This commit is contained in:
artur 2024-02-12 10:57:55 +03:00
parent 0cf042e5d9
commit 81b8624bd1

View File

@ -64,7 +64,7 @@ export const ModalConfirmConnect = () => {
const isNpubExists = npub.trim().length && keys.some((key) => key.npub === npub)
const isAppNpubExists = appNpub.trim().length && apps.some((app) => app.appNpub === appNpub)
const isPendingReqIdExists = pendingReqId.trim().length && pending.some((p) => p.id === pendingReqId)
if (isModalOpened && (!isNpubExists || !isAppNpubExists || !isPendingReqIdExists)) {
if (isModalOpened && (!isNpubExists || !isAppNpubExists || (pendingReqId && !isPendingReqIdExists))) {
closeModalAfterRequest()
return null
}