Skip to content

Commit f04810c

Browse files
looplabs-funclaude
andcommitted
fix(token): finish the native-unit sweep on the Hood view
Second pass over the same class of bug: figures whose VALUE follows the chain but whose LABEL was hardcoded to SOL. On the Hood view these printed a Solana ticker beside ETH numbers. - "Fees earned · routed" total (the per-role rows were fixed already, the sum above them was not). - ProjectWallet: deployed 24h, pending sign-off, daily budget used, and the on-chain guardrail caps. Left alone deliberately, because they are genuinely Solana facts and relabelling them would be the actual lie: the buyback history (0.1 SOL → 528,810 $LOOP), the "Pay SOL" bridge tab, backlog items about Solana work, and the agent's compute budget — that spend really is paid in SOL from the Solana treasury regardless of which chain's market you're looking at. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
1 parent 28f7ff5 commit f04810c

2 files changed

Lines changed: 10 additions & 5 deletions

File tree

components/token/ProjectWallet.tsx

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import { useInspector } from "@/lib/inspector";
55
import { DEFAULT_POLICY } from "@/lib/agent-actions";
66
import type { WalletAction } from "@/lib/agent-data";
77
import type { Project } from "@/lib/types";
8+
import { chainInfo } from "@/lib/chains/registry";
89
import { walletRunway, fmtRunwayDays } from "@/lib/wallet-runway";
910
import { budgetStatus } from "@/lib/budget-status";
1011

@@ -55,6 +56,10 @@ export function ProjectWallet({
5556
agentSol?: number | null;
5657
}) {
5758
const { inspect } = useInspector();
59+
// Spend figures here are NATIVE units — on Hood the agent transacts in ETH,
60+
// and the guardrail caps are a policy in whatever the chain's native asset is.
61+
// Hardcoding "SOL" put a Solana ticker on Hood numbers.
62+
const nativeSym = chainInfo(p.chain === "hood" ? "hood" : "solana").nativeSymbol;
5863
const wallet = p.agentWallet ?? null;
5964
const net = p.network ?? "mainnet";
6065
// Net SOL deployed by executed actions (buyback in, others out).
@@ -251,11 +256,11 @@ export function ProjectWallet({
251256
Net deployed (executed)
252257
{pendingSignOff > 0 && (
253258
<span className="text-warn ml-1">
254-
· {pendingSignOff} awaiting sign-off ({pendingSignOffSol.toFixed(2)} SOL)
259+
· {pendingSignOff} awaiting sign-off ({pendingSignOffSol.toFixed(2)} {nativeSym})
255260
</span>
256261
)}
257262
</span>
258-
<span className="font-mono text-ink">{deployed.toFixed(2)} SOL</span>
263+
<span className="font-mono text-ink">{deployed.toFixed(2)} {nativeSym}</span>
259264
</div>
260265

261266
{/* Runway estimate — only shown when we have a live balance AND a positive
@@ -273,7 +278,7 @@ export function ProjectWallet({
273278
<div className="flex items-center justify-between text-[11px] text-faint mb-[5px]">
274279
<span>Daily budget used</span>
275280
<span className={`font-mono ${dailyBudget.over ? "text-neg" : "text-muted"}`}>
276-
{solDeployed24h.toFixed(2)} / {DEFAULT_POLICY.maxDailySol} SOL
281+
{solDeployed24h.toFixed(2)} / {DEFAULT_POLICY.maxDailySol} {nativeSym}
277282
</span>
278283
</div>
279284
<div className="h-[3px] rounded-full bg-line-3 overflow-hidden">
@@ -295,7 +300,7 @@ export function ProjectWallet({
295300
>
296301
<span>On-chain guardrails</span>
297302
<span className="font-mono text-muted">
298-
{DEFAULT_POLICY.maxSolPerAction} SOL / action · ≤ {DEFAULT_POLICY.maxDailySol} SOL / 24h
303+
{DEFAULT_POLICY.maxSolPerAction} {nativeSym} / action · ≤ {DEFAULT_POLICY.maxDailySol} {nativeSym} / 24h
299304
</span>
300305
</div>
301306
)}

components/token/TokenPage.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1471,7 +1471,7 @@ function FeesCustodyCard({
14711471
<div className="flex items-center justify-between">
14721472
<span className="text-muted">Fees earned · routed</span>
14731473
<span className="font-mono text-[12px] text-pos">
1474-
{totalEarned.toFixed(4)} SOL
1474+
{totalEarned.toFixed(4)} {nativeSym}
14751475
</span>
14761476
</div>
14771477
<EarnedRow label="Founder" sol={ledger.earned.founderSol} unit={nativeSym} />

0 commit comments

Comments
 (0)