Skip to content
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

Points: rm rainbow emojis from tweet intent #5249

Merged
merged 1 commit into from
Dec 14, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 4 additions & 17 deletions src/screens/points/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,6 @@ export const triggerHapticFeedback = (hapticType: HapticFeedbackType) =>
ReactNativeHapticFeedback.trigger(hapticType);

const BASE_URL = `https://twitter.com/intent/tweet?text=`;
const RAINBOW = `🌈`;
const RAINBOWS_STRING_GENERATOR = (num: number) => RAINBOW.repeat(num);
export const buildTwitterIntentMessage = (
profile: OnboardPointsMutation | undefined,
metamaskSwaps: PointsOnboardingCategory | undefined
Expand All @@ -86,26 +84,15 @@ export const buildTwitterIntentMessage = (
profile.onboardPoints.user.onboarding.earnings.total;
const referralCode = profile.onboardPoints.user.referralCode;

let text = `I just had ${ONBOARDING_TOTAL_POINTS} Rainbow Points dropped into my wallet — everybody has at least 100 points waiting for them, but you might have more!\n\nClaim your drop: https://rainbow.me/points?ref=${referralCode}`;

if (metamaskSwaps && metamaskSwaps?.earnings?.total > 0) {
const METAMASK_POINTS = metamaskSwaps.earnings.total;

const rainbows = RAINBOWS_STRING_GENERATOR(3);

let text = rainbows;
text += `\n\nI just had ${
text = `I just had ${
ONBOARDING_TOTAL_POINTS - METAMASK_POINTS
} Rainbow Points dropped into my wallet — plus an extra ${METAMASK_POINTS} Points as a bonus for migrating my MetaMask wallet into Rainbow 🦊 🔫\n\nEverybody has at least 100 points waiting for them, but you might have more! Claim your drop: https://rainbow.me/points?ref=${referralCode}\n\n`;
text += rainbows;

return BASE_URL + text;
} Rainbow Points dropped into my wallet — plus an extra ${METAMASK_POINTS} Points as a bonus for migrating my MetaMask wallet into Rainbow 🦊 🔫\n\nEverybody has at least 100 points waiting for them, but you might have more! Claim your drop: https://rainbow.me/points?ref=${referralCode}`;
}

const rainbows = RAINBOWS_STRING_GENERATOR(17);

let text = rainbows;
text += `\n\nI just had ${ONBOARDING_TOTAL_POINTS} Rainbow Points dropped into my wallet — everybody has at least 100 points waiting for them, but you might have more!\n\nClaim your drop: https://rainbow.me/points?ref=${referralCode}\n\n`;
text += rainbows;

return BASE_URL + text;
};

Expand Down
Loading