import { getCurrentUserID , IUserData } from '@client/applications' ; import { storage } from '@client/storage' ; async function loadUserPin ( ) { const currentUserID = await getCurrentUserID ( ) ; const allUserData = JSON . parse ( ( await storage . getItem ( 'USER_DATA' ) ) as string ) as IUserData [ ] ; const currentUserData = allUserData . find ( ( user ) => user . userID === currentUserID ) as IUserData ; return currentUserData . userPIN as string ; } export const pinLoader = { loadUserPin } ;