File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed
packages/mobile-app/app/onboarding Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -90,6 +90,7 @@ export default function CreatePin() {
90
90
const { next } = useLocalSearchParams ( ) ;
91
91
const facade = useFacade ( ) ;
92
92
const createAccount = facade . createAccount . useMutation ( ) ;
93
+ const setAppSetting = facade . setAppSetting . useMutation ( ) ;
93
94
const isImportFlow = next === "import-account" ;
94
95
95
96
const isPinValid = ( pin : string ) => {
@@ -127,6 +128,17 @@ export default function CreatePin() {
127
128
return ;
128
129
}
129
130
131
+ try {
132
+ // Save the PIN when it's confirmed
133
+ await setAppSetting . mutateAsync ( {
134
+ key : "pin" ,
135
+ value : pinValue ,
136
+ } ) ;
137
+ } catch {
138
+ setError ( "Failed to save PIN. Please try again." ) ;
139
+ return ;
140
+ }
141
+
130
142
// If we're in the import flow, go to import selection
131
143
if ( next === "import-account" ) {
132
144
router . push ( "/onboarding/import-account" ) ;
You can’t perform that action at this time.
0 commit comments