From d4973eea825f0239e4e93c8beda83ac9f74468e5 Mon Sep 17 00:00:00 2001 From: Cho Young-Hwi Date: Fri, 24 Apr 2026 11:31:00 +0900 Subject: [PATCH] [#152] Fix agent registration tx link and profile URL - Store txHash from register-agent API response in linkStatus state - Show BaseScan transaction link after successful ERC-8004 registration - Fix profile URL from /agents/{id} to /profile/{walletAddress} Fixes #152 Co-Authored-By: Claude Opus 4.6 (1M context) --- app/web/components/Settings.tsx | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/app/web/components/Settings.tsx b/app/web/components/Settings.tsx index 1813a8b..990f97d 100644 --- a/app/web/components/Settings.tsx +++ b/app/web/components/Settings.tsx @@ -9,7 +9,7 @@ export function Settings({ token, onLogout }: { token: string; onLogout: () => v const [savingPassphrase, setSavingPassphrase] = useState(false); // Agent identity registration - const [linkStatus, setLinkStatus] = useState<{ linked: boolean; agentId?: number; owsWallet?: string; owner?: string } | null>(null); + const [linkStatus, setLinkStatus] = useState<{ linked: boolean; agentId?: number; owsWallet?: string; owner?: string; txHash?: string } | null>(null); const [agentName, setAgentName] = useState("AI Writer"); const [agentDescription, setAgentDescription] = useState(""); const [agentGenre, setAgentGenre] = useState(""); @@ -52,7 +52,7 @@ export function Settings({ token, onLogout }: { token: string; onLogout: () => v }); const data = await res.json(); if (!res.ok) throw new Error(data.error || "Registration failed"); - setLinkStatus({ linked: true, agentId: data.agentId, owsWallet: data.owsWallet }); + setLinkStatus({ linked: true, agentId: data.agentId, owsWallet: data.owsWallet, txHash: data.txHash }); } catch (err: unknown) { setRegisterError(err instanceof Error ? err.message : "Registration failed"); } @@ -141,8 +141,15 @@ export function Settings({ token, onLogout }: { token: string; onLogout: () => v Owner: {linkStatus.owner.slice(0, 6)}...{linkStatus.owner.slice(-4)}

)} + {linkStatus.txHash && ( +

+ + View transaction on BaseScan + +

+ )}

- + View agent profile on plotlink.xyz