@@ -18,7 +18,6 @@ import {
18
18
} from "@/features/onboarding/constants/animationConstants" ;
19
19
import { useRouter } from "@/navigation/useNavigation" ;
20
20
import { Pressable } from "@/design-system/Pressable" ;
21
- import { setAuthStatus } from "@/data/store/authStore" ;
22
21
import { useCurrentAccount } from "@/data/store/accountsStore" ;
23
22
import { formatRandoDisplayName } from "@/utils/str" ;
24
23
import { OnboardingContactCard } from "@/features/onboarding/components/onboarding-contact-card" ;
@@ -30,7 +29,6 @@ import { formatRandomUserName } from "@/features/onboarding/utils/formatRandomUs
30
29
import { useAddPfp } from "@/features/onboarding/hooks/useAddPfp" ;
31
30
import { useCreateOrUpdateProfileInfo } from "@/features/onboarding/hooks/useCreateOrUpdateProfileInfo" ;
32
31
import { useProfile } from "@/features/onboarding/hooks/useProfile" ;
33
- import { needToShowNotificationsPermissions } from "@/features/onboarding/Onboarding.utils" ;
34
32
import { ProfileType } from "@/features/onboarding/types/onboarding.types" ;
35
33
import { NativeStackScreenProps } from "@react-navigation/native-stack" ;
36
34
import { NavigationParamList } from "../Navigation/Navigation" ;
@@ -75,8 +73,6 @@ export const NewAccountContactCardScreen = memo(
75
73
) {
76
74
const { navigation } = props ;
77
75
78
- const router = useRouter ( ) ;
79
-
80
76
const address = useCurrentAccount ( ) ! ;
81
77
82
78
const { themed } = useAppTheme ( ) ;
@@ -144,16 +140,14 @@ export const NewAccountContactCardScreen = memo(
144
140
profile : newProfile ,
145
141
} ) ;
146
142
if ( success ) {
147
- if ( needToShowNotificationsPermissions ( ) ) {
148
- router . push ( "OnboardingNotifications" ) ;
149
- } else {
150
- setAuthStatus ( "signedIn" ) ;
151
- }
143
+ navigation . popTo ( "Chats" ) ;
144
+ } else {
145
+ throw new Error ( "Failed to create or update profile" ) ;
152
146
}
153
147
} catch ( error ) {
154
148
handleError ( error as Error ) ;
155
149
}
156
- } , [ createOrUpdateProfile , profile , router , handleError , asset ?. uri ] ) ;
150
+ } , [ profile , asset ?. uri , createOrUpdateProfile , navigation , handleError ] ) ;
157
151
158
152
const handleContinue = useCallback ( ( ) => {
159
153
logger . debug ( "[NewAccountContactCardScreen] handleContinue" , type ) ;
0 commit comments