Skip to content

Commit

Permalink
formatting (#5251)
Browse files Browse the repository at this point in the history
  • Loading branch information
benisgold authored Dec 14, 2023
1 parent c432f3b commit 8b54d8e
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions src/screens/points/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,13 +85,19 @@ 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}`;
let text = `I just had ${ONBOARDING_TOTAL_POINTS.toLocaleString(
'en-US'
)} 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;
text = `I 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}`;
).toLocaleString(
'en-US'
)} Rainbow Points dropped into my wallet β€” plus an extra ${METAMASK_POINTS.toLocaleString(
'en-US'
)} 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}`;
}

return BASE_URL + text;
Expand Down

0 comments on commit 8b54d8e

Please sign in to comment.