-
Notifications
You must be signed in to change notification settings - Fork 276
Update unique ID for share referral links #4891
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
src/components/themed/SideMenu.tsx
Outdated
const refId = hashjs.sha256().update(data).digest('hex') | ||
|
||
const website = `${config.website}?af=referred_${refId}` | ||
console.debug(website) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove debug
src/components/themed/SideMenu.tsx
Outdated
const data = Uint8Array.from(Buffer.from(account.rootLoginId, 'hex')) | ||
const refId = hashjs.sha256().update(data).digest('hex') | ||
|
||
const website = `${config.website}?af=referred_${refId}` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just so it's not so long, remove the 0x
prefix and truncate to 10 digits. also, prefix should be appreferred_
6780ec7
to
4d014d1
Compare
src/components/themed/SideMenu.tsx
Outdated
const website = `${config.website}?af=referred_${refId}` | ||
console.debug(website) | ||
// Truncate the refId to 10 characters using the first and last 5 chars: | ||
refId = refId.substring(0, 5) + refId.substring(refId.length - 5) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just use the first 10 characters. refId
is a hash so it doesn't matter.
96e09e3
to
2f5d4ed
Compare
fixup! Update unique ID for share referral links
2f5d4ed
to
f59a3bd
Compare
This pull request updates the unique ID used for generating share referral links. It replaces the previous method of using base58ToUuid with a new method that generates an anonymized referral ID using hash.js. This ensures that the referral links are more secure and unique.
CHANGELOG
Does this branch warrant an entry to the CHANGELOG?
Dependencies
noneRequirements
If you have made any visual changes to the GUI. Make sure you have: