import * as bcrypt from 'bcryptjs' ; import { pinLoader } from '@client/views/Unlock/utils' ; async function isValidPin ( pin ) { const userPin = await pinLoader . loadUserPin ( ) ; return await bcrypt . compare ( pin , userPin ) ; } export const pinValidator = { isValidPin : isValidPin } ;