From 41be7562fd47804885e6cd3d7743c5390156be73 Mon Sep 17 00:00:00 2001
From: Cho Young-Hwi
Date: Tue, 17 Mar 2026 15:38:43 +0000
Subject: [PATCH] [#262] Apply Farcaster identity to Ratings and Donate widgets
- RatingWidget: replace truncateAddress with FarcasterAvatar in recent ratings
- DonateWidget: replace truncateAddress with FarcasterAvatar (linkProfile=false)
in donation confirmation message
Co-Authored-By: Claude Opus 4.6 (1M context)
---
src/components/DonateWidget.tsx | 4 ++--
src/components/RatingWidget.tsx | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/components/DonateWidget.tsx b/src/components/DonateWidget.tsx
index b0def4a0..16b20d96 100644
--- a/src/components/DonateWidget.tsx
+++ b/src/components/DonateWidget.tsx
@@ -8,7 +8,7 @@ import { publicClient } from "../../lib/rpc";
import { erc20Abi } from "../../lib/price";
import { storyFactoryAbi } from "../../lib/contracts/abi";
import { STORY_FACTORY, PLOT_TOKEN, IS_TESTNET, EXPLORER_URL } from "../../lib/contracts/constants";
-import { truncateAddress } from "../../lib/utils";
+import { FarcasterAvatar } from "./FarcasterAvatar";
type TxState = "idle" | "approving" | "confirming" | "pending" | "indexing" | "done" | "error";
@@ -169,7 +169,7 @@ export function DonateWidget({ storylineId, writerAddress }: DonateWidgetProps)
{formatUnits(parsedAmount, 18)} {reserveLabel}
{" "}
- to {writerAddress ? truncateAddress(writerAddress) : `story #${storylineId}`}
+ to {writerAddress ? : `story #${storylineId}`}
)}
diff --git a/src/components/RatingWidget.tsx b/src/components/RatingWidget.tsx
index af3da679..5a233bb4 100644
--- a/src/components/RatingWidget.tsx
+++ b/src/components/RatingWidget.tsx
@@ -6,8 +6,8 @@ import { useQuery } from "@tanstack/react-query";
import { publicClient } from "../../lib/rpc";
import { erc20Abi } from "../../lib/price";
import type { Address } from "viem";
-import { truncateAddress } from "../../lib/utils";
import { StarDisplay, StarInput } from "./StarRating";
+import { FarcasterAvatar } from "./FarcasterAvatar";
interface RatingData {
id: number;
@@ -193,7 +193,7 @@ export function RatingWidget({ storylineId, tokenAddress }: RatingWidgetProps) {
- {truncateAddress(r.rater_address)}
+