From 62f602a5e9d25fe2b714fbb06e750cc30e2829a2 Mon Sep 17 00:00:00 2001 From: "Seshanth.S" <35675963+seshanthS@users.noreply.github.com> Date: Wed, 21 Jan 2026 00:17:34 +0530 Subject: [PATCH] add debug logging switch to NFCMethodSelectionScreen (#1626) --- .../DocumentNFCMethodSelectionScreen.tsx | 31 ++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) diff --git a/app/src/screens/documents/scanning/DocumentNFCMethodSelectionScreen.tsx b/app/src/screens/documents/scanning/DocumentNFCMethodSelectionScreen.tsx index 317992b4f..f72acbc7d 100644 --- a/app/src/screens/documents/scanning/DocumentNFCMethodSelectionScreen.tsx +++ b/app/src/screens/documents/scanning/DocumentNFCMethodSelectionScreen.tsx @@ -4,7 +4,7 @@ import React, { useState } from 'react'; import { Platform, ScrollView } from 'react-native'; -import { Input, YStack } from 'tamagui'; +import { Input, Switch, XStack, YStack } from 'tamagui'; import { useNavigation } from '@react-navigation/native'; import type { NativeStackNavigationProp } from '@react-navigation/native-stack'; @@ -21,6 +21,7 @@ import { white } from '@selfxyz/mobile-sdk-alpha/constants/colors'; import { ExpandableBottomLayout } from '@/layouts/ExpandableBottomLayout'; import type { RootStackParamList } from '@/navigation'; +import { useSettingStore } from '@/stores/settingStore'; type NFCParams = { skipPACE?: boolean; @@ -111,6 +112,10 @@ const DocumentNFCMethodSelectionScreen: React.FC = () => { const { useMRZStore } = selfClient; const { update, passportNumber, dateOfBirth, dateOfExpiry } = useMRZStore(); + const loggingSeverity = useSettingStore(state => state.loggingSeverity); + const setLoggingSeverity = useSettingStore(state => state.setLoggingSeverity); + const isDebugMode = loggingSeverity === 'debug'; + const handleSelect = (key: string) => { setSelectedMethod(key); setError(''); @@ -153,6 +158,30 @@ const DocumentNFCMethodSelectionScreen: React.FC = () => { Choose NFC Scan Method + + Debug Logging + { + setLoggingSeverity(checked ? 'debug' : 'warn'); + }} + backgroundColor={isDebugMode ? '$green7Light' : '$gray4'} + style={{ minWidth: 48, minHeight: 36 }} + > + + + + {NFC_METHODS.filter(method => method.platform.includes(Platform.OS), ).map(method => (