diff --git a/src/app/story/[storylineId]/page.tsx b/src/app/story/[storylineId]/page.tsx index 2f2ac8f9..24773ea1 100644 --- a/src/app/story/[storylineId]/page.tsx +++ b/src/app/story/[storylineId]/page.tsx @@ -151,7 +151,7 @@ export default async function StoryPage({ params }: { params: Params }) { {sl.token_address && ( )} - + {sl.token_address && ( )} diff --git a/src/components/DonateWidget.tsx b/src/components/DonateWidget.tsx index 4cc1b28c..b0def4a0 100644 --- a/src/components/DonateWidget.tsx +++ b/src/components/DonateWidget.tsx @@ -8,14 +8,16 @@ 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"; type TxState = "idle" | "approving" | "confirming" | "pending" | "indexing" | "done" | "error"; interface DonateWidgetProps { storylineId: number; + writerAddress?: string; } -export function DonateWidget({ storylineId }: DonateWidgetProps) { +export function DonateWidget({ storylineId, writerAddress }: DonateWidgetProps) { const { address, isConnected } = useAccount(); const [amount, setAmount] = useState(""); const [txState, setTxState] = useState("idle"); @@ -167,7 +169,7 @@ export function DonateWidget({ storylineId }: DonateWidgetProps) { {formatUnits(parsedAmount, 18)} {reserveLabel} {" "} - to story #{storylineId} + to {writerAddress ? truncateAddress(writerAddress) : `story #${storylineId}`}

)}