import { queryVerificationCode } from '@proton/shared/lib/api/user' ; import { VerificationModel } from './interface' ; export const getFormattedCode = ( value , code ) => { return `${ value }:${ code }` . replace ( /\s/g , '' ) ; } ; export const getRoute = ( verificationModel ) => { if ( verificationModel . method === 'email' ) { return queryVerificationCode ( 'email' , { Address : verificationModel . value } ) ; } return queryVerificationCode ( 'sms' , { Phone : verificationModel . value } ) ; } ;