diff --git a/src/pages/KYC/IndividualKycFormV2.tsx b/src/pages/KYC/IndividualKycFormV2.tsx index 07e8db275..abb7f4e0a 100644 --- a/src/pages/KYC/IndividualKycFormV2.tsx +++ b/src/pages/KYC/IndividualKycFormV2.tsx @@ -30,6 +30,7 @@ import { EmailType, SecondaryContactTypeV2, SuccessType } from './enum' import SecondaryContactOption from './SecondaryContactOption' import CountriesBlockAlert from './CountriesBlockAlert' import useQuery from 'hooks/useQuery' +import { isValidReferralCode } from 'utils' export const FormRow = styled(Row)` align-items: flex-start; @@ -172,6 +173,11 @@ export default function IndividualKycFormV2() { useEffect(() => { console.log('APP URL', window.location.href) const code = query.get('referralCode') + + if (!code || !isValidReferralCode(code)) { + return + } + const storedReferralCode = localStorage.getItem('referralCode') if (code) { setReferralCode(code)