diff --git a/apps/api/src/affiliate/utils/affiliateCodeGenerator.ts b/apps/api/src/affiliate/utils/affiliateCodeGenerator.ts index 219be8d2f..a82d09e6a 100644 --- a/apps/api/src/affiliate/utils/affiliateCodeGenerator.ts +++ b/apps/api/src/affiliate/utils/affiliateCodeGenerator.ts @@ -1,6 +1,6 @@ import crypto from 'crypto' export function affiliateCodeGenerator(affiliateId: string) { - const uniqueHash = crypto.createHash('sha256').update(affiliateId).digest('hex').slice(0, 5) + const uniqueHash = crypto.createHash('sha256').update(affiliateId).digest('hex').slice(0, 8) return 'af_' + uniqueHash }