Game name now visible on game mod cards and sliders. Mod post reactions now functional. Zap refactored. #33
@ -1882,13 +1882,15 @@ const Reactions = ({ modDetails }: ReactionsProps) => {
|
|||||||
?.signEvent(unsignedEvent)
|
?.signEvent(unsignedEvent)
|
||||||
.then((event) => event as Event)
|
.then((event) => event as Event)
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
toast.error('Failed to sign the event!')
|
toast.error('Failed to sign the reaction event!')
|
||||||
log(true, LogType.Error, 'Failed to sign the event!', err)
|
log(true, LogType.Error, 'Failed to sign the event!', err)
|
||||||
return null
|
return null
|
||||||
})
|
})
|
||||||
|
|
||||||
if (!signedEvent) return
|
if (!signedEvent) return
|
||||||
|
|
||||||
|
setReactionEvents((prev) => [...prev, signedEvent])
|
||||||
|
|
||||||
const publishedOnRelays = await RelayController.getInstance().publish(
|
const publishedOnRelays = await RelayController.getInstance().publish(
|
||||||
signedEvent as Event,
|
signedEvent as Event,
|
||||||
modDetails.author,
|
modDetails.author,
|
||||||
@ -1896,11 +1898,13 @@ const Reactions = ({ modDetails }: ReactionsProps) => {
|
|||||||
)
|
)
|
||||||
|
|
||||||
if (publishedOnRelays.length === 0) {
|
if (publishedOnRelays.length === 0) {
|
||||||
toast.error('Failed to publish reaction event on any relay')
|
log(
|
||||||
|
true,
|
||||||
|
LogType.Error,
|
||||||
|
'Failed to publish reaction event on any relay'
|
||||||
|
)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
setReactionEvents((prev) => [...prev, signedEvent])
|
|
||||||
} finally {
|
} finally {
|
||||||
setIsReactionInProgress(false)
|
setIsReactionInProgress(false)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user