mirror of
https://github.com/selfxyz/self.git
synced 2026-02-19 02:24:25 -05:00
chore: hide kyc entry points for release 2.9.15 (#1712)
* hide kyc entry points * formatting
This commit is contained in:
@@ -30,6 +30,7 @@ import { NavBar } from '@/components/navbar/BaseNavBar';
|
||||
import { useSumsubLauncher } from '@/hooks/useSumsubLauncher';
|
||||
import { buttonTap } from '@/integrations/haptics';
|
||||
import type { RootStackParamList } from '@/navigation';
|
||||
import { useSettingStore } from '@/stores/settingStore';
|
||||
import { extraYPadding } from '@/utils/styleUtils';
|
||||
|
||||
type AadhaarUploadErrorRouteParams = {
|
||||
@@ -66,6 +67,7 @@ const AadhaarUploadErrorScreen: React.FC = () => {
|
||||
useNavigation<NativeStackNavigationProp<RootStackParamList>>();
|
||||
const route = useRoute<AadhaarUploadErrorRoute>();
|
||||
const { trackEvent } = useSelfClient();
|
||||
const kycEnabled = useSettingStore(state => state.kycEnabled);
|
||||
|
||||
const errorType = route.params?.errorType || 'general';
|
||||
const { title, description } = getErrorMessages(errorType);
|
||||
@@ -214,40 +216,44 @@ const AadhaarUploadErrorScreen: React.FC = () => {
|
||||
paddingBottom={paddingBottom}
|
||||
gap={10}
|
||||
>
|
||||
{/* Secondary Button - White fill, black text, rounded */}
|
||||
<Button
|
||||
backgroundColor={white}
|
||||
borderWidth={1}
|
||||
borderColor={slate200}
|
||||
borderRadius={100}
|
||||
height={52}
|
||||
pressStyle={{ opacity: 0.8 }}
|
||||
onPress={handleTryAlternative}
|
||||
disabled={isRetrying}
|
||||
>
|
||||
<BodyText
|
||||
style={{
|
||||
fontSize: 17,
|
||||
fontWeight: '500',
|
||||
fontFamily: dinot,
|
||||
color: black,
|
||||
}}
|
||||
>
|
||||
{isRetrying ? 'Loading...' : 'Try a different method'}
|
||||
</BodyText>
|
||||
</Button>
|
||||
{kycEnabled && (
|
||||
<>
|
||||
{/* Secondary Button - White fill, black text, rounded */}
|
||||
<Button
|
||||
backgroundColor={white}
|
||||
borderWidth={1}
|
||||
borderColor={slate200}
|
||||
borderRadius={100}
|
||||
height={52}
|
||||
pressStyle={{ opacity: 0.8 }}
|
||||
onPress={handleTryAlternative}
|
||||
disabled={isRetrying}
|
||||
>
|
||||
<BodyText
|
||||
style={{
|
||||
fontSize: 17,
|
||||
fontWeight: '500',
|
||||
fontFamily: dinot,
|
||||
color: black,
|
||||
}}
|
||||
>
|
||||
{isRetrying ? 'Loading...' : 'Try a different method'}
|
||||
</BodyText>
|
||||
</Button>
|
||||
|
||||
{/* Footer Text - Not italic */}
|
||||
<BodyText
|
||||
style={{
|
||||
fontSize: 16,
|
||||
textAlign: 'center',
|
||||
color: slate500,
|
||||
}}
|
||||
>
|
||||
Registering with alternative methods may take longer to verify your
|
||||
document.
|
||||
</BodyText>
|
||||
{/* Footer Text - Not italic */}
|
||||
<BodyText
|
||||
style={{
|
||||
fontSize: 16,
|
||||
textAlign: 'center',
|
||||
color: slate500,
|
||||
}}
|
||||
>
|
||||
Registering with alternative methods may take longer to verify
|
||||
your document.
|
||||
</BodyText>
|
||||
</>
|
||||
)}
|
||||
</YStack>
|
||||
</YStack>
|
||||
);
|
||||
|
||||
@@ -28,6 +28,7 @@ import { NavBar } from '@/components/navbar/BaseNavBar';
|
||||
import { useSumsubLauncher } from '@/hooks/useSumsubLauncher';
|
||||
import { buttonTap } from '@/integrations/haptics';
|
||||
import type { RootStackParamList } from '@/navigation';
|
||||
import { useSettingStore } from '@/stores/settingStore';
|
||||
import { extraYPadding } from '@/utils/styleUtils';
|
||||
|
||||
type RegistrationFallbackMRZRouteParams = {
|
||||
@@ -60,6 +61,7 @@ const RegistrationFallbackMRZScreen: React.FC = () => {
|
||||
const { trackEvent, useMRZStore } = selfClient;
|
||||
const storeCountryCode = useMRZStore(state => state.countryCode);
|
||||
const documentType = useMRZStore(state => state.documentType);
|
||||
const kycEnabled = useSettingStore(state => state.kycEnabled);
|
||||
|
||||
// Use country code from route params, or fall back to MRZ store
|
||||
const countryCode = route.params?.countryCode || storeCountryCode || '';
|
||||
@@ -214,40 +216,44 @@ const RegistrationFallbackMRZScreen: React.FC = () => {
|
||||
paddingBottom={paddingBottom}
|
||||
gap={10}
|
||||
>
|
||||
{/* Secondary Button - White fill, black text, rounded */}
|
||||
<Button
|
||||
backgroundColor={white}
|
||||
borderWidth={1}
|
||||
borderColor={slate200}
|
||||
borderRadius={100}
|
||||
height={52}
|
||||
pressStyle={{ opacity: 0.8 }}
|
||||
onPress={handleTryAlternative}
|
||||
disabled={isRetrying}
|
||||
>
|
||||
<BodyText
|
||||
style={{
|
||||
fontSize: 17,
|
||||
fontWeight: '500',
|
||||
fontFamily: dinot,
|
||||
color: black,
|
||||
}}
|
||||
>
|
||||
{isRetrying ? 'Loading...' : 'Try a different method'}
|
||||
</BodyText>
|
||||
</Button>
|
||||
{kycEnabled && (
|
||||
<>
|
||||
{/* Secondary Button - White fill, black text, rounded */}
|
||||
<Button
|
||||
backgroundColor={white}
|
||||
borderWidth={1}
|
||||
borderColor={slate200}
|
||||
borderRadius={100}
|
||||
height={52}
|
||||
pressStyle={{ opacity: 0.8 }}
|
||||
onPress={handleTryAlternative}
|
||||
disabled={isRetrying}
|
||||
>
|
||||
<BodyText
|
||||
style={{
|
||||
fontSize: 17,
|
||||
fontWeight: '500',
|
||||
fontFamily: dinot,
|
||||
color: black,
|
||||
}}
|
||||
>
|
||||
{isRetrying ? 'Loading...' : 'Try a different method'}
|
||||
</BodyText>
|
||||
</Button>
|
||||
|
||||
{/* Footer Text - Not italic */}
|
||||
<BodyText
|
||||
style={{
|
||||
fontSize: 16,
|
||||
textAlign: 'center',
|
||||
color: slate500,
|
||||
}}
|
||||
>
|
||||
Registering with alternative methods may take longer to verify your
|
||||
document.
|
||||
</BodyText>
|
||||
{/* Footer Text - Not italic */}
|
||||
<BodyText
|
||||
style={{
|
||||
fontSize: 16,
|
||||
textAlign: 'center',
|
||||
color: slate500,
|
||||
}}
|
||||
>
|
||||
Registering with alternative methods may take longer to verify
|
||||
your document.
|
||||
</BodyText>
|
||||
</>
|
||||
)}
|
||||
</YStack>
|
||||
</YStack>
|
||||
);
|
||||
|
||||
@@ -29,6 +29,7 @@ import { NavBar } from '@/components/navbar/BaseNavBar';
|
||||
import { useSumsubLauncher } from '@/hooks/useSumsubLauncher';
|
||||
import { buttonTap } from '@/integrations/haptics';
|
||||
import type { RootStackParamList } from '@/navigation';
|
||||
import { useSettingStore } from '@/stores/settingStore';
|
||||
import { extraYPadding } from '@/utils/styleUtils';
|
||||
|
||||
type RegistrationFallbackNFCRouteParams = {
|
||||
@@ -61,6 +62,7 @@ const RegistrationFallbackNFCScreen: React.FC = () => {
|
||||
const { trackEvent, useMRZStore } = selfClient;
|
||||
const storeCountryCode = useMRZStore(state => state.countryCode);
|
||||
const documentType = useMRZStore(state => state.documentType);
|
||||
const kycEnabled = useSettingStore(state => state.kycEnabled);
|
||||
|
||||
// Use country code from route params, or fall back to MRZ store
|
||||
const countryCode = route.params?.countryCode || storeCountryCode || '';
|
||||
@@ -240,40 +242,44 @@ const RegistrationFallbackNFCScreen: React.FC = () => {
|
||||
paddingBottom={paddingBottom}
|
||||
gap={10}
|
||||
>
|
||||
{/* Secondary Button - White fill, black text, rounded */}
|
||||
<Button
|
||||
backgroundColor={white}
|
||||
borderWidth={1}
|
||||
borderColor={slate200}
|
||||
borderRadius={100}
|
||||
height={52}
|
||||
pressStyle={{ opacity: 0.8 }}
|
||||
onPress={handleTryAlternative}
|
||||
disabled={isRetrying}
|
||||
>
|
||||
<BodyText
|
||||
style={{
|
||||
fontSize: 17,
|
||||
fontWeight: '500',
|
||||
fontFamily: dinot,
|
||||
color: black,
|
||||
}}
|
||||
>
|
||||
{isRetrying ? 'Loading...' : 'Try a different method'}
|
||||
</BodyText>
|
||||
</Button>
|
||||
{kycEnabled && (
|
||||
<>
|
||||
{/* Secondary Button - White fill, black text, rounded */}
|
||||
<Button
|
||||
backgroundColor={white}
|
||||
borderWidth={1}
|
||||
borderColor={slate200}
|
||||
borderRadius={100}
|
||||
height={52}
|
||||
pressStyle={{ opacity: 0.8 }}
|
||||
onPress={handleTryAlternative}
|
||||
disabled={isRetrying}
|
||||
>
|
||||
<BodyText
|
||||
style={{
|
||||
fontSize: 17,
|
||||
fontWeight: '500',
|
||||
fontFamily: dinot,
|
||||
color: black,
|
||||
}}
|
||||
>
|
||||
{isRetrying ? 'Loading...' : 'Try a different method'}
|
||||
</BodyText>
|
||||
</Button>
|
||||
|
||||
{/* Footer Text - Not italic */}
|
||||
<BodyText
|
||||
style={{
|
||||
fontSize: 16,
|
||||
textAlign: 'center',
|
||||
color: slate500,
|
||||
}}
|
||||
>
|
||||
Registering with alternative methods may take longer to verify your
|
||||
document.
|
||||
</BodyText>
|
||||
{/* Footer Text - Not italic */}
|
||||
<BodyText
|
||||
style={{
|
||||
fontSize: 16,
|
||||
textAlign: 'center',
|
||||
color: slate500,
|
||||
}}
|
||||
>
|
||||
Registering with alternative methods may take longer to verify
|
||||
your document.
|
||||
</BodyText>
|
||||
</>
|
||||
)}
|
||||
</YStack>
|
||||
</YStack>
|
||||
);
|
||||
|
||||
@@ -32,6 +32,7 @@ import {
|
||||
import { ExpandableBottomLayout } from '@/layouts/ExpandableBottomLayout';
|
||||
import type { RootStackParamList } from '@/navigation';
|
||||
import { useFeedback } from '@/providers/feedbackProvider';
|
||||
import { useSettingStore } from '@/stores/settingStore';
|
||||
|
||||
type LogoConfirmationScreenRouteProp = RouteProp<
|
||||
RootStackParamList,
|
||||
@@ -45,6 +46,7 @@ const LogoConfirmationScreen: React.FC = () => {
|
||||
useNavigation<NativeStackNavigationProp<RootStackParamList>>();
|
||||
const { showModal } = useFeedback();
|
||||
const navigateToOnboarding = useHapticNavigation('DocumentOnboarding');
|
||||
const kycEnabled = useSettingStore(state => state.kycEnabled);
|
||||
|
||||
const handleConfirm = useCallback(() => {
|
||||
buttonTap();
|
||||
@@ -112,7 +114,9 @@ const LogoConfirmationScreen: React.FC = () => {
|
||||
<ExpandableBottomLayout.BottomSection backgroundColor={white}>
|
||||
<ButtonsContainer>
|
||||
<PrimaryButton onPress={handleConfirm}>Yes</PrimaryButton>
|
||||
<SecondaryButton onPress={handleNotFound}>No</SecondaryButton>
|
||||
{kycEnabled && (
|
||||
<SecondaryButton onPress={handleNotFound}>No</SecondaryButton>
|
||||
)}
|
||||
</ButtonsContainer>
|
||||
</ExpandableBottomLayout.BottomSection>
|
||||
</ExpandableBottomLayout.Layout>
|
||||
|
||||
Reference in New Issue
Block a user