From b98b7cb86f84f1b3d97ce43c4b516164316d3d74 Mon Sep 17 00:00:00 2001 From: Erwan Leboucher Date: Wed, 2 Sep 2026 14:12:42 +0200 Subject: [PATCH] fix(crypto): stop stale verification flows from swallowing new requests --- src/app/components/DeviceVerification.tsx | 15 ++++- src/app/crypto/engineCrypto/EngineCrypto.ts | 47 +++++++++++++--- .../incomingVerificationRequest.test.ts | 56 +++++++++++++++++++ src/app/hooks/useVerificationRequest.test.tsx | 26 ++++++++- src/app/hooks/useVerificationRequest.ts | 4 ++ 5 files changed, 134 insertions(+), 14 deletions(-) diff --git a/src/app/components/DeviceVerification.tsx b/src/app/components/DeviceVerification.tsx index c28a1cc27b..9a2f5ce9fa 100644 --- a/src/app/components/DeviceVerification.tsx +++ b/src/app/components/DeviceVerification.tsx @@ -62,12 +62,16 @@ type VerificationAcceptProps = { onAccept: () => Promise; }; function VerificationAccept({ onAccept }: VerificationAcceptProps) { - const [acceptState, accept] = useAsyncCallback(onAccept); + const [acceptState, accept] = useAsyncCallback(onAccept); const accepting = acceptState.status === AsyncStatus.Loading; return ( - Click accept to start the verification process. + + {acceptState.status === AsyncStatus.Error + ? acceptState.error.message + : 'Click accept to start the verification process.'} +