Skip to content

Commit 6bf1542

Browse files
committed
fix: check if signing with QR before rejecting
1 parent 898629e commit 6bf1542

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

app/components/Views/confirmations/context/qr-hardware-context/qr-hardware-context.tsx

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,12 +50,14 @@ export const QRHardwareContextProvider: React.FC<{
5050
return;
5151
}
5252
e.preventDefault();
53-
Engine.getQrKeyringScanner().rejectPendingScan(
54-
new Error('Request cancelled'),
55-
);
53+
if (isSigningQRObject) {
54+
Engine.getQrKeyringScanner().rejectPendingScan(
55+
new Error('Request cancelled'),
56+
);
57+
}
5658
navigation.dispatch(e.data.action);
5759
},
58-
[isRequestCompleted, navigation],
60+
[isRequestCompleted, navigation, isSigningQRObject],
5961
);
6062

6163
useEffect(() => {

0 commit comments

Comments
 (0)