show event on failed decrypt

This commit is contained in:
hzrd149
2024-02-03 17:55:00 +00:00
parent cf75336e65
commit 56c5f077ec

View File

@@ -6,6 +6,7 @@ import { useDecryptionContainer } from "../../../providers/global/dycryption-pro
import useCurrentAccount from "../../../hooks/use-current-account"; import useCurrentAccount from "../../../hooks/use-current-account";
import { getDMRecipient, getDMSender } from "../../../helpers/nostr/dms"; import { getDMRecipient, getDMSender } from "../../../helpers/nostr/dms";
import { NostrEvent } from "../../../types/nostr-event"; import { NostrEvent } from "../../../types/nostr-event";
import DebugEventButton from "../../../components/debug-modal/debug-event-button";
export default function DecryptPlaceholder({ export default function DecryptPlaceholder({
children, children,
@@ -39,7 +40,8 @@ export default function DecryptPlaceholder({
<Alert status="error"> <Alert status="error">
<AlertIcon /> <AlertIcon />
<AlertDescription>{error.message}</AlertDescription> <AlertDescription>{error.message}</AlertDescription>
<Button isLoading={loading} leftIcon={<UnlockIcon />} onClick={decrypt} size="sm" ml="auto"> <DebugEventButton event={message} size="sm" ml="auto" mr="2" />
<Button isLoading={loading} leftIcon={<UnlockIcon />} onClick={decrypt} size="sm">
Try again Try again
</Button> </Button>
</Alert> </Alert>