From a9bc9469cc69b71bee300388d8216e8f59b90092 Mon Sep 17 00:00:00 2001
From: fr1j0
Date: Sat, 4 Oct 2025 01:01:50 +0300
Subject: [PATCH 001/103] feat: add referral link generation feature with
analytics tracking
---
src/ProtectedLayout.tsx | 9 ++
src/components/ReferralLinkGenerator.tsx | 105 +++++++++++++
src/components/nav/nav/Navbar.tsx | 1 +
src/components/nav/nav/Navi.desktop.tsx | 5 +
src/components/nav/nav/Navi.mobile.tsx | 7 +
src/constants/analytics-events.ts | 22 +++
src/pages/Referral.tsx | 181 +++++++++++++++++++++++
src/utils/referral.ts | 63 ++++++++
8 files changed, 393 insertions(+)
create mode 100644 src/components/ReferralLinkGenerator.tsx
create mode 100644 src/pages/Referral.tsx
create mode 100644 src/utils/referral.ts
diff --git a/src/ProtectedLayout.tsx b/src/ProtectedLayout.tsx
index 09581e3b1..630ae118b 100644
--- a/src/ProtectedLayout.tsx
+++ b/src/ProtectedLayout.tsx
@@ -8,6 +8,7 @@ import Explorer from "./pages/Explorer";
import Field from "./pages/Field";
import { Market as MarketPage } from "./pages/Market";
import Overview from "./pages/Overview";
+import Referral from "./pages/Referral";
import Silo from "./pages/Silo";
import SiloToken from "./pages/SiloToken";
import Swap from "./pages/Swap";
@@ -60,6 +61,14 @@ export default function ProtectedLayout() {
}
/>
+
+
+
+ }
+ />
+
Connect your wallet to generate a referral link
+
+ );
+ }
+
+ const encodedRef = encodeReferralAddress(address);
+ const referralUrl = `${window.location.origin}/field?ref=${encodedRef}`;
+
+ // Calculate total sown beans from plots
+ const totalSownBeans = farmerField.plots.reduce((total, plot) => {
+ // Each plot represents pods sown. To get beans sown, we use the initial sown amount
+ // which is stored in the plot data
+ return total + (plot.pods?.toNumber() || 0);
+ }, 0);
+
+ // For now, we'll use the totalPods as a proxy. In production, you'd want to query
+ // the subgraph for the actual sownBeans value from farmer.field.sownBeans
+ const isEligible = totalSownBeans >= MIN_SOWN_BEANS;
+
+ const handleCopy = () => {
+ navigator.clipboard.writeText(referralUrl);
+ toast.success("Referral link copied to clipboard!");
+
+ trackSimpleEvent(ANALYTICS_EVENTS.REFERRAL.LINK_COPIED, {
+ address,
+ is_eligible: isEligible,
+ total_sown_beans: totalSownBeans,
+ });
+ };
+
+ const handleGenerateClick = () => {
+ trackSimpleEvent(ANALYTICS_EVENTS.REFERRAL.LINK_GENERATED, {
+ address,
+ is_eligible: isEligible,
+ total_sown_beans: totalSownBeans,
+ });
+ };
+
+ return (
+
+
+
Your Referral Link
+
+ Share your link to earn 1% bonus Pods when others sow using it
+
+
+
+ {!isEligible && (
+
+ You need to sow at least {formatter.number(MIN_SOWN_BEANS)} Beans before your referral link will work.
+
+ Current: {formatter.number(totalSownBeans)} Beans sown.
+
+ )}
+
+
+
+
+
+
+
+ {isEligible && (
+
+ ✓ Your referral link is active! You'll earn 1% bonus Pods when someone sows using your link.
+
+ )}
+
+
+
+
How it works:
+
+
Share your referral link with others
+
When they sow Beans using your link, you both earn bonus Pods
+
You receive 1% of the Pods they earn as a referral bonus
+
They get their full Pod allocation plus the referral bonus
+ Track your earned Pods and see how you rank among top referrers.
+
+
+
+
+ {/* How It Works */}
+
+
How It Works
+
+
+
+ 1
+
+
+
Qualify as a Referrer
+
Sow at least 1,000 Beans in the Field to unlock your referral link.
+
+
+
+
+
+ 2
+
+
+
Share Your Link
+
Copy your unique referral link and share it with friends, on social media, or anywhere else.
+
+
+
+
+
+ 3
+
+
+
Earn Rewards
+
+ When someone uses your link and sows Beans, you earn 1% of the Pods they receive as a referral bonus.
+
+
+
+
+
+
+ 4
+
+
+
Get Credited
+
+ Referral rewards are automatically credited to your wallet address when your referral completes their
+ sow transaction.
+
+
+
+
+
+
+ {/* Example Section */}
+
+
Example
+
+
+
Scenario:
+
+ Alice has sown 5,000 Beans in the Field. She shares her referral link with Bob.
+
+
+
+
+
What Happens:
+
+
Bob clicks Alice's referral link and visits Pinto
+
Bob connects his wallet and sows 1,000 Beans
+
Bob receives 1,000 Pods (assuming 1:1 weather)
+
Alice automatically receives 10 Pods (1% of 1,000 Pods) as a referral bonus
+
+
+
+
+
Result:
+
+ Alice earns passive Pods every time someone uses her referral link to sow Beans. The more people she
+ refers, the more she earns!
+
+
+
+
+
+ {/* Requirements Card */}
+
+
Requirements & FAQs
+
+
+
Why do I need to sow 1,000 Beans first?
+
+ This requirement ensures that referrers are genuine participants in the Pinto ecosystem and helps
+ prevent spam or gaming of the referral system.
+
+
+
+
+
+ Is there a limit to how many people I can refer?
+
+
No! You can refer as many people as you'd like. There is no cap on referral earnings.
+
+
+
+
When do I receive my referral rewards?
+
+ Referral rewards are credited immediately when your referral completes their sow transaction. The Pods
+ are sent directly to your wallet address.
+
+
+
+
+
Can I refer myself?
+
+ No, self-referrals are not allowed. Referral links are tracked by wallet address, so using your own link
+ won't generate rewards.
+
+
+
+
+
What if I lose my referral link?
+
+ Don't worry! You can always come back to this page while connected with your wallet to retrieve your
+ referral link. It's permanently associated with your wallet address.
+
+
+
+
+
+ {/* Call to Action */}
+
+
+
Ready to Start Earning?
+
+ Connect your wallet and start sharing your referral link today. Help grow the Pinto community and earn
+ passive rewards!
+
+
+
+
+
+ );
+}
diff --git a/src/utils/referral.ts b/src/utils/referral.ts
new file mode 100644
index 000000000..1ae7ce0b3
--- /dev/null
+++ b/src/utils/referral.ts
@@ -0,0 +1,63 @@
+import type { Address } from "viem";
+import { isAddress, zeroAddress } from "viem";
+
+/**
+ * Encode an Ethereum address to base64 for URL shortening
+ * Treats the address as raw bytes (20 bytes) and encodes to base64
+ *
+ * @param address - Ethereum address (0x prefixed hex string)
+ * @returns Base64 encoded string (28 characters)
+ */
+export function encodeReferralAddress(address: Address): string {
+ // Remove 0x prefix
+ const hex = address.slice(2);
+
+ // Convert hex string to byte array
+ const hexPairs = hex.match(/.{1,2}/g) || [];
+ const bytes = new Uint8Array(hexPairs.map((byte) => Number.parseInt(byte, 16)));
+
+ // Convert bytes to base64
+ const base64 = btoa(String.fromCharCode(...bytes));
+
+ return base64;
+}
+
+/**
+ * Decode a base64 referral code back to an Ethereum address
+ *
+ * @param encoded - Base64 encoded referral code
+ * @returns Ethereum address or null if invalid
+ */
+export function decodeReferralAddress(encoded: string): Address | null {
+ try {
+ // Decode base64 to bytes
+ const decoded = atob(encoded);
+ const bytes = new Uint8Array(decoded.length);
+ for (let i = 0; i < decoded.length; i++) {
+ bytes[i] = decoded.charCodeAt(i);
+ }
+
+ // Convert bytes to hex string
+ const hex = `0x${Array.from(bytes)
+ .map((b) => b.toString(16).padStart(2, "0"))
+ .join("")}`;
+
+ // Validate it's a proper address
+ if (!isAddress(hex)) return null;
+ if (hex === zeroAddress) return null;
+
+ return hex as Address;
+ } catch {
+ return null;
+ }
+}
+
+/**
+ * Check if a referral code is valid (can be decoded to a valid address)
+ *
+ * @param code - Base64 encoded referral code
+ * @returns true if valid, false otherwise
+ */
+export function isValidReferralCode(code: string): boolean {
+ return decodeReferralAddress(code) !== null;
+}
From 619d3774d04d2ba413bd74a74696af1067714592 Mon Sep 17 00:00:00 2001
From: fr1j0
Date: Sat, 4 Oct 2025 01:08:53 +0300
Subject: [PATCH 002/103] feat: add referral rewards info to Swap rewards
tooltip
---
src/constants/meta.ts | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/src/constants/meta.ts b/src/constants/meta.ts
index db4a6cf8d..4986a172d 100644
--- a/src/constants/meta.ts
+++ b/src/constants/meta.ts
@@ -25,6 +25,7 @@ const slugs = [
"PINTO",
"sPinto",
"tractor",
+ "referral",
] as const;
const nestedSlugs = ["PINTOUSDC", "PINTOcbBTC", "PINTOWSOL", "PINTOWETH", "PINTOcbETH", "PINTO"] as const;
@@ -133,6 +134,11 @@ const PINTO_META: Record = {
description: "View and manage your collection of Pinto NFTs.",
url: "https://pinto.money/collectionsoon",
},
+ referral: {
+ title: "Referral | Pinto",
+ description: "Share Pinto and earn rewards through referrals.",
+ url: "https://pinto.money/referral",
+ },
};
export default PINTO_META;
From 5e4bb9b7267e16436dbb86be7b002358c3d9d1d1 Mon Sep 17 00:00:00 2001
From: fr1j0
Date: Sat, 4 Oct 2025 02:07:50 +0300
Subject: [PATCH 003/103] feat: enhance referral link UX with real-time copy
feedback and improved analytics tracking
---
src/components/ReferralLinkGenerator.tsx | 32 ++++++++++--
src/constants/analytics-events.ts | 1 +
src/pages/Referral.tsx | 64 +++++++-----------------
3 files changed, 47 insertions(+), 50 deletions(-)
diff --git a/src/components/ReferralLinkGenerator.tsx b/src/components/ReferralLinkGenerator.tsx
index 8ffc59175..c0a1fa9d4 100644
--- a/src/components/ReferralLinkGenerator.tsx
+++ b/src/components/ReferralLinkGenerator.tsx
@@ -7,7 +7,7 @@ import { useFarmerField } from "@/state/useFarmerField";
import { trackSimpleEvent } from "@/utils/analytics";
import { formatter } from "@/utils/format";
import { encodeReferralAddress } from "@/utils/referral";
-import { CopyIcon } from "@radix-ui/react-icons";
+import { CopyIcon, Share1Icon } from "@radix-ui/react-icons";
import { toast } from "sonner";
import { useAccount } from "wagmi";
@@ -58,6 +58,19 @@ export function ReferralLinkGenerator() {
});
};
+ const handleTwitterShare = () => {
+ const tweetText =
+ "🌱 I'm farming on @PintoProtocol and earning passive rewards!\n\nJoin me and we both earn bonus Pods when you sow Beans 🫘\n\nStart farming today:";
+ const twitterUrl = `https://twitter.com/intent/tweet?text=${encodeURIComponent(tweetText)}&url=${encodeURIComponent(referralUrl)}`;
+ window.open(twitterUrl, "_blank", "noopener,noreferrer");
+
+ trackSimpleEvent(ANALYTICS_EVENTS.REFERRAL.TWITTER_SHARE, {
+ address,
+ is_eligible: isEligible,
+ total_sown_beans: totalSownBeans,
+ });
+ };
+
return (
@@ -85,9 +98,20 @@ export function ReferralLinkGenerator() {
{isEligible && (
-
- ✓ Your referral link is active! You'll earn 1% bonus Pods when someone sows using your link.
-
+ <>
+
+ ✓ Your referral link is active! You'll earn 1% bonus Pods when someone sows using your link.
+
- Track your earned Pods and see how you rank among top referrers.
-
-
-
+ {/* Main Referral Cards - Two Column Layout */}
+
+ {/* Your Referral Link */}
+
+
+
+
+ {/* Your Referral Stats */}
+
+
Your Referral Stats
+
+
Referral stats and leaderboard coming soon!
+
+ Track your earned Pods and see how you rank among top referrers.
+
+
+
+
{/* How It Works */}
@@ -89,37 +92,6 @@ export default function Referral() {
- {/* Example Section */}
-
-
Example
-
-
-
Scenario:
-
- Alice has sown 5,000 Beans in the Field. She shares her referral link with Bob.
-
-
-
-
-
What Happens:
-
-
Bob clicks Alice's referral link and visits Pinto
-
Bob connects his wallet and sows 1,000 Beans
-
Bob receives 1,000 Pods (assuming 1:1 weather)
-
Alice automatically receives 10 Pods (1% of 1,000 Pods) as a referral bonus
-
-
-
-
-
Result:
-
- Alice earns passive Pods every time someone uses her referral link to sow Beans. The more people she
- refers, the more she earns!
-
-
-
-
-
{/* Requirements Card */}
Requirements & FAQs
From db9241e15371877e31696d185fc5d5dc26ece1d7 Mon Sep 17 00:00:00 2001
From: fr1j0
Date: Sat, 4 Oct 2025 02:34:56 +0300
Subject: [PATCH 004/103] feat: improve referral page styling and add progress
bar
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
- Update page layout to use consistent design system (variant="lg" container)
- Replace all typography with Pinto design system classes
- Add Separator component for consistent visual hierarchy
- Replace text-based warning with visual horizontal progress bar
- Show qualification progress with animated gradient bar
- Display remaining beans needed to unlock referral link
- Update all color classes to use design system tokens
- Improve mobile responsiveness with responsive padding
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude
---
src/components/ReferralLinkGenerator.tsx | 35 ++--
src/pages/Referral.tsx | 241 ++++++++++++-----------
2 files changed, 150 insertions(+), 126 deletions(-)
diff --git a/src/components/ReferralLinkGenerator.tsx b/src/components/ReferralLinkGenerator.tsx
index c0a1fa9d4..f5139a2d1 100644
--- a/src/components/ReferralLinkGenerator.tsx
+++ b/src/components/ReferralLinkGenerator.tsx
@@ -1,7 +1,6 @@
import { Button } from "@/components/ui/Button";
import { Card } from "@/components/ui/Card";
import { Input } from "@/components/ui/Input";
-import Warning from "@/components/ui/Warning";
import { ANALYTICS_EVENTS } from "@/constants/analytics-events";
import { useFarmerField } from "@/state/useFarmerField";
import { trackSimpleEvent } from "@/utils/analytics";
@@ -71,21 +70,35 @@ export function ReferralLinkGenerator() {
});
};
+ const progressPercentage = Math.min((totalSownBeans / MIN_SOWN_BEANS) * 100, 100);
+
return (
Your Referral Link
-
+
Share your link to earn 1% bonus Pods when others sow using it
{!isEligible && (
-
- You need to sow at least {formatter.number(MIN_SOWN_BEANS)} Beans before your referral link will work.
-
- Current: {formatter.number(totalSownBeans)} Beans sown.
-
+
✓ Your referral link is active! You'll earn 1% bonus Pods when someone sows using your link.
{/* Twitter Share Button */}
-
Share on Social
+
Share on Social
-
How it works:
-
+
How it works:
+
Share your referral link with others
When they sow Beans using your link, you both earn bonus Pods
You receive 1% of the Pods they earn as a referral bonus
diff --git a/src/pages/Referral.tsx b/src/pages/Referral.tsx
index 8f3065b74..70026f30d 100644
--- a/src/pages/Referral.tsx
+++ b/src/pages/Referral.tsx
@@ -1,5 +1,6 @@
import PageContainer from "@/components/ui/PageContainer";
import { Card } from "@/components/ui/Card";
+import { Separator } from "@/components/ui/Separator";
import { ReferralLinkGenerator } from "@/components/ReferralLinkGenerator";
import { ANALYTICS_EVENTS } from "@/constants/analytics-events";
import { trackSimpleEvent } from "@/utils/analytics";
@@ -11,142 +12,152 @@ export default function Referral() {
}, []);
return (
-
-
- {/* Hero Section */}
-
-
Pinto Referral Program
-
- Earn rewards by referring new farmers to Pinto. Share your referral link and earn 1% of the Pods your
- referrals sow.
-
-
+
+
+
+ {/* Hero Section */}
+
+
Referral Program
+
+ Earn rewards by referring new farmers to Pinto. Share your referral link and earn 1% of the Pods your
+ referrals sow.
+
+
+
- {/* Main Referral Cards - Two Column Layout */}
-
- {/* Your Referral Link */}
-
-
-
+ {/* Main Referral Cards - Two Column Layout */}
+
+ {/* Your Referral Link */}
+
+
+
- {/* Your Referral Stats */}
-
-
Your Referral Stats
-
-
Referral stats and leaderboard coming soon!
-
- Track your earned Pods and see how you rank among top referrers.
-
-
-
-
+ {/* Your Referral Stats */}
+
+
Your Referral Stats
+
+
Referral stats and leaderboard coming soon!
+
+ Track your earned Pods and see how you rank among top referrers.
+
+
+
+
- {/* How It Works */}
-
-
How It Works
-
-
-
- 1
+ {/* How It Works */}
+
+
How It Works
+
+
+
+ 1
+
+
+
Qualify as a Referrer
+
+ Sow at least 1,000 Beans in the Field to unlock your referral link.
+
+
-
-
Qualify as a Referrer
-
Sow at least 1,000 Beans in the Field to unlock your referral link.
+
+
+
+ 2
+
+
+
Share Your Link
+
+ Copy your unique referral link and share it with friends, on social media, or anywhere else.
+
+
-
-
-
- 2
+
+
+ 3
+
+
+
Earn Rewards
+
+ When someone uses your link and sows Beans, you earn 1% of the Pods they receive as a referral
+ bonus.
+
+
-
-
Share Your Link
-
Copy your unique referral link and share it with friends, on social media, or anywhere else.
+
+
+
+ 4
+
+
+
Get Credited
+
+ Referral rewards are automatically credited to your wallet address when your referral completes
+ their sow transaction.
+
+
+
-
-
- 3
-
+ {/* Requirements Card */}
+
+
Requirements & FAQs
+
-
Earn Rewards
-
- When someone uses your link and sows Beans, you earn 1% of the Pods they receive as a referral bonus.
-
+
Why do I need to sow 1,000 Beans first?
+
+ This requirement ensures that referrers are genuine participants in the Pinto ecosystem and helps
+ prevent spam or gaming of the referral system.
+
-
-
-
- 4
-
-
Get Credited
-
- Referral rewards are automatically credited to your wallet address when your referral completes their
- sow transaction.
-
+
+ Is there a limit to how many people I can refer?
+
+
+ No! You can refer as many people as you'd like. There is no cap on referral earnings.
+
-
-
-
-
- {/* Requirements Card */}
-
-
Requirements & FAQs
-
-
-
Why do I need to sow 1,000 Beans first?
-
- This requirement ensures that referrers are genuine participants in the Pinto ecosystem and helps
- prevent spam or gaming of the referral system.
-
-
-
-
- Is there a limit to how many people I can refer?
-
-
No! You can refer as many people as you'd like. There is no cap on referral earnings.
-
+
+
When do I receive my referral rewards?
+
+ Referral rewards are credited immediately when your referral completes their sow transaction. The Pods
+ are sent directly to your wallet address.
+
+
-
-
When do I receive my referral rewards?
-
- Referral rewards are credited immediately when your referral completes their sow transaction. The Pods
- are sent directly to your wallet address.
-
-
+
+
Can I refer myself?
+
+ No, self-referrals are not allowed. Referral links are tracked by wallet address, so using your own
+ link won't generate rewards.
+
+
-
-
Can I refer myself?
-
- No, self-referrals are not allowed. Referral links are tracked by wallet address, so using your own link
- won't generate rewards.
-
+
+
What if I lose my referral link?
+
+ Don't worry! You can always come back to this page while connected with your wallet to retrieve your
+ referral link. It's permanently associated with your wallet address.
+
+
+
-
-
What if I lose my referral link?
-
- Don't worry! You can always come back to this page while connected with your wallet to retrieve your
- referral link. It's permanently associated with your wallet address.
-
+ {/* Call to Action */}
+
+
+
Ready to Start Earning?
+
+ Connect your wallet and start sharing your referral link today. Help grow the Pinto community and earn
+ passive rewards!
+
-
-
-
- {/* Call to Action */}
-
-
-
Ready to Start Earning?
-
- Connect your wallet and start sharing your referral link today. Help grow the Pinto community and earn
- passive rewards!
-
-
-
+
+
);
From a7f7a370f3ece40ab600914ce6312445ca8a2834 Mon Sep 17 00:00:00 2001
From: fr1j0
Date: Sat, 4 Oct 2025 03:06:19 +0300
Subject: [PATCH 005/103] fix: improve referral link input width and layout
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
- Add min-w-0 to input to allow proper flexbox shrinking
- Add text-sm to input for better URL readability
- Add whitespace-nowrap to Copy button to prevent text wrapping
- Ensure input takes maximum available space in flex container
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude
---
src/components/ReferralLinkGenerator.tsx | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/components/ReferralLinkGenerator.tsx b/src/components/ReferralLinkGenerator.tsx
index f5139a2d1..d917ccc09 100644
--- a/src/components/ReferralLinkGenerator.tsx
+++ b/src/components/ReferralLinkGenerator.tsx
@@ -103,8 +103,8 @@ export function ReferralLinkGenerator() {
- Sow at least 1,000 Beans in the Field to unlock your referral link.
+ Sow at least 1,000 Pinto in the Field to unlock your referral link.
@@ -79,7 +79,7 @@ export default function Referral() {
Earn Rewards
- When someone uses your link and sows Beans, you earn 1% of the Pods they receive as a referral
+ When someone uses your link and sows Pinto, you earn 1% of the Pods they receive as a referral
bonus.
@@ -105,7 +105,7 @@ export default function Referral() {
Requirements & FAQs
-
Why do I need to sow 1,000 Beans first?
+
Why do I need to sow 1,000 Pinto first?
This requirement ensures that referrers are genuine participants in the Pinto ecosystem and helps
prevent spam or gaming of the referral system.
From a2d756255bbd4ae092abc5e8a25e4dcdd3133593 Mon Sep 17 00:00:00 2001
From: fr1j0
Date: Sat, 4 Oct 2025 03:09:33 +0300
Subject: [PATCH 007/103] feat: separate leaderboard and improve referral stats
display
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
- Split "Your Referral Stats" and "Referral Leaderboard" into separate cards
- Move leaderboard section above "How It Works" component
- Update referral stats to show specific metrics:
- Total Pods Earned (placeholder: 0)
- Successful Referrals (placeholder: 0)
- Improve visual hierarchy with dedicated sections
- Add better spacing and layout for stats display
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude
---
src/pages/Referral.tsx | 23 +++++++++++++++++++----
1 file changed, 19 insertions(+), 4 deletions(-)
diff --git a/src/pages/Referral.tsx b/src/pages/Referral.tsx
index d3058f9d1..ca4ff659f 100644
--- a/src/pages/Referral.tsx
+++ b/src/pages/Referral.tsx
@@ -35,15 +35,30 @@ export default function Referral() {
{/* Your Referral Stats */}
Your Referral Stats
-
-
Referral stats and leaderboard coming soon!
-
- Track your earned Pods and see how you rank among top referrers.
+
+
+
Total Pods Earned
+
0
+
+
+
Successful Referrals
+
0
+ {/* Leaderboard */}
+
+
Referral Leaderboard
+
+
Leaderboard coming soon!
+
+ See how you rank among top referrers in the Pinto community.
+
+
+
+
{/* How It Works */}
How It Works
From 94551f1c6a60495c68d69f197afc0114d7cc9101 Mon Sep 17 00:00:00 2001
From: fr1j0
Date: Sat, 4 Oct 2025 03:11:55 +0300
Subject: [PATCH 008/103] fix: update referral bonus to 10% and clarify only
referrer earns
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
- Update all instances of 1% to 10% referral bonus
- Clarify that only the referrer earns the bonus, not both parties
- Update Twitter share text to reflect accurate mechanics
- Update hero description and all "How It Works" copy
- Remove misleading "you both earn" language
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude
---
src/components/ReferralLinkGenerator.tsx | 6 +++---
src/pages/Referral.tsx | 4 ++--
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/src/components/ReferralLinkGenerator.tsx b/src/components/ReferralLinkGenerator.tsx
index cecbfe7bd..abd438004 100644
--- a/src/components/ReferralLinkGenerator.tsx
+++ b/src/components/ReferralLinkGenerator.tsx
@@ -59,7 +59,7 @@ export function ReferralLinkGenerator() {
const handleTwitterShare = () => {
const tweetText =
- "🌱 I'm farming on @PintoProtocol and earning passive rewards!\n\nJoin me and we both earn bonus Pods when you sow Pinto 🫘\n\nStart farming today:";
+ "🌱 I'm farming on @PintoProtocol and earning passive rewards!\n\nJoin me and I'll earn bonus Pods when you sow Pinto 🫘\n\nStart farming today:";
const twitterUrl = `https://twitter.com/intent/tweet?text=${encodeURIComponent(tweetText)}&url=${encodeURIComponent(referralUrl)}`;
window.open(twitterUrl, "_blank", "noopener,noreferrer");
@@ -77,7 +77,7 @@ export function ReferralLinkGenerator() {
Your Referral Link
- Share your link to earn 1% bonus Pods when others sow using it
+ Share your link to earn 10% bonus Pods when others sow using it
- ✓ Your referral link is active! You'll earn 1% bonus Pods when someone sows using your link.
+ ✓ Your referral link is active! You'll earn 10% bonus Pods when someone sows using your link.
- Earn rewards by referring new farmers to Pinto. Share your referral link and earn 1% of the Pods your
+ Earn rewards by referring new farmers to Pinto. Share your referral link and earn 10% of the Pods your
referrals sow.
@@ -94,7 +94,7 @@ export default function Referral() {
Earn Rewards
- When someone uses your link and sows Pinto, you earn 1% of the Pods they receive as a referral
+ When someone uses your link and sows Pinto, you earn 10% of the Pods they receive as a referral
bonus.
From a049d72812fd4a926dcea7839d41f804c9f5058a Mon Sep 17 00:00:00 2001
From: fr1j0
Date: Sat, 4 Oct 2025 03:13:25 +0300
Subject: [PATCH 009/103] refactor: capitalize Sow, remove CTA, and improve
stats layout
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
- Capitalize all instances of "sow/sows" to "Sow/Sows" for brand consistency
- Remove "Ready to Start Earning?" CTA card (redundant)
- Change stats layout from 2 rows to 2 columns in 1 row (grid-cols-2)
- Update all copy across both referral components
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude
---
src/components/ReferralLinkGenerator.tsx | 6 +++---
src/pages/Referral.tsx | 23 ++++++-----------------
2 files changed, 9 insertions(+), 20 deletions(-)
diff --git a/src/components/ReferralLinkGenerator.tsx b/src/components/ReferralLinkGenerator.tsx
index abd438004..6ffde32d8 100644
--- a/src/components/ReferralLinkGenerator.tsx
+++ b/src/components/ReferralLinkGenerator.tsx
@@ -59,7 +59,7 @@ export function ReferralLinkGenerator() {
const handleTwitterShare = () => {
const tweetText =
- "🌱 I'm farming on @PintoProtocol and earning passive rewards!\n\nJoin me and I'll earn bonus Pods when you sow Pinto 🫘\n\nStart farming today:";
+ "🌱 I'm farming on @PintoProtocol and earning passive rewards!\n\nJoin me and I'll earn bonus Pods when you Sow Pinto 🫘\n\nStart farming today:";
const twitterUrl = `https://twitter.com/intent/tweet?text=${encodeURIComponent(tweetText)}&url=${encodeURIComponent(referralUrl)}`;
window.open(twitterUrl, "_blank", "noopener,noreferrer");
@@ -77,7 +77,7 @@ export function ReferralLinkGenerator() {
Your Referral Link
- Share your link to earn 10% bonus Pods when others sow using it
+ Share your link to earn 10% bonus Pods when others Sow using it
- ✓ Your referral link is active! You'll earn 10% bonus Pods when someone sows using your link.
+ ✓ Your referral link is active! You'll earn 10% bonus Pods when someone Sows using your link.
Earn rewards by referring new farmers to Pinto. Share your referral link and earn 10% of the Pods your
- referrals sow.
+ referrals Sow.
@@ -35,7 +35,7 @@ export default function Referral() {
{/* Your Referral Stats */}
Your Referral Stats
-
+
Total Pods Earned
0
@@ -94,7 +94,7 @@ export default function Referral() {
Earn Rewards
- When someone uses your link and sows Pinto, you earn 10% of the Pods they receive as a referral
+ When someone uses your link and Sows Pinto, you earn 10% of the Pods they receive as a referral
bonus.
@@ -108,7 +108,7 @@ export default function Referral() {
Get Credited
Referral rewards are automatically credited to your wallet address when your referral completes
- their sow transaction.
+ their Sow transaction.
@@ -120,7 +120,7 @@ export default function Referral() {
Requirements & FAQs
-
Why do I need to sow 1,000 Pinto first?
+
Why do I need to Sow 1,000 Pinto first?
This requirement ensures that referrers are genuine participants in the Pinto ecosystem and helps
prevent spam or gaming of the referral system.
@@ -139,7 +139,7 @@ export default function Referral() {
When do I receive my referral rewards?
- Referral rewards are credited immediately when your referral completes their sow transaction. The Pods
+ Referral rewards are credited immediately when your referral completes their Sow transaction. The Pods
are sent directly to your wallet address.
@@ -161,17 +161,6 @@ export default function Referral() {
-
- {/* Call to Action */}
-
-
-
Ready to Start Earning?
-
- Connect your wallet and start sharing your referral link today. Help grow the Pinto community and earn
- passive rewards!
-
-
-
From b32e59c16c5ce2e3472fff4fad5b081d34e25b4d Mon Sep 17 00:00:00 2001
From: fr1j0
Date: Sat, 4 Oct 2025 03:15:08 +0300
Subject: [PATCH 010/103] feat: improve referral link UX with disabled state
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
- Move referral link input to always be visible at top
- Disable input and copy button when threshold not met (grayed out)
- Reorder UI: link input first, then qualification progress, then active state
- Better visual hierarchy showing link is locked until qualified
- Input adapts to full width with flex-1 min-w-0
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude
---
src/components/ReferralLinkGenerator.tsx | 55 ++++++++++++++----------
1 file changed, 33 insertions(+), 22 deletions(-)
diff --git a/src/components/ReferralLinkGenerator.tsx b/src/components/ReferralLinkGenerator.tsx
index 6ffde32d8..8a387c377 100644
--- a/src/components/ReferralLinkGenerator.tsx
+++ b/src/components/ReferralLinkGenerator.tsx
@@ -81,35 +81,46 @@ export function ReferralLinkGenerator() {
- Sow {formatter.number(MIN_SOWN_BEANS - totalSownBeans)} more Pinto to unlock your referral link
-
+ {/* Referral Link */}
+
+
+
+
+
+
+ Copy
+
- )}
-
-
-
-
-
- Copy
-
- {isEligible && (
- <>
-
- ✓ Your referral link is active! You'll earn 10% bonus Pods when someone Sows using your link.
+ {/* Pod Destination Address and Share via - Row Layout */}
+