File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed
infrastructure/eid-wallet/src/routes/(auth)/register Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -38,6 +38,8 @@ const handleConfirmFirst = () => {
3838};
3939
4040const handleConfirmRepeat = async () => {
41+ if (repeatPin .length !== 4 ) return ;
42+
4143 if (pin !== repeatPin ) {
4244 isError = true ;
4345 currentStep = " CREATE" ;
@@ -46,7 +48,17 @@ const handleConfirmRepeat = async () => {
4648 return ;
4749 }
4850
51+ if (! globalState ) {
52+ console .error (" Global state not available; cannot set onboarding PIN." );
53+ isError = true ;
54+ currentStep = " CREATE" ;
55+ pin = " " ;
56+ repeatPin = " " ;
57+ return ;
58+ }
59+
4960 try {
61+ isError = false ;
5062 await globalState ?.securityController .setOnboardingPin (pin , repeatPin );
5163 currentStep = " PIN_DONE" ;
5264 } catch (error ) {
You can’t perform that action at this time.
0 commit comments