@@ -12,8 +12,8 @@ import {
1212} from "lucide-react" ;
1313import { motion , AnimatePresence } from "framer-motion" ;
1414import Link from "next/link" ;
15-
16- const API_BASE_URL = process . env . NEXT_PUBLIC_API_BASE_URL ?? "http://localhost:4000 ";
15+ import { API_BASE_URL } from "@/lib/config" ;
16+ import { stellarExpertUrl } from "@/lib/stellar ";
1717
1818type ActivityItem = {
1919 id : string ;
@@ -120,13 +120,13 @@ export function ActivityFeed({ username, limit = 10 }: ActivityFeedProps) {
120120 id : `tx-${ tx . id } ` ,
121121 type : "support" ,
122122 title : `Received ${ tx . amount } ${ tx . assetCode } ` ,
123- description : `Support from ${ truncateHash ( tx . senderAddress , 8 ) } ` ,
123+ description : `Support from ${ truncateHash ( tx . supporterAddress ?? '' , 8 ) } ` ,
124124 timestamp : tx . createdAt ,
125125 icon : getActivityIcon ( "support" ) ,
126126 metadata : {
127127 amount : tx . amount ,
128128 assetCode : tx . assetCode ,
129- supporter : tx . senderAddress ,
129+ supporter : tx . supporterAddress ,
130130 txHash : tx . txHash ,
131131 } ,
132132 } ) ;
@@ -257,7 +257,7 @@ export function ActivityFeed({ username, limit = 10 }: ActivityFeedProps) {
257257 ) }
258258 { activity . metadata . txHash && (
259259 < Link
260- href = { `https://stellar.expert/explorer/ ${ process . env . NEXT_PUBLIC_STELLAR_NETWORK === 'MAINNET' ? 'mainnet' : 'testnet' } /tx/ ${ activity . metadata . txHash } ` }
260+ href = { stellarExpertUrl ( 'tx' , activity . metadata . txHash ) }
261261 target = "_blank"
262262 rel = "noopener noreferrer"
263263 className = "inline-flex items-center gap-1 px-2 py-1 rounded bg-white/5 text-xs text-white/70 hover:text-white/90 transition font-mono"
0 commit comments