Skip to content

fix: auth, wallet linking, Luca chat, and stablecoin USD pricing#217

Open
danbuildss wants to merge 1 commit into
mainfrom
claude/luca-aeon-skills-caygz-ybmgik
Open

fix: auth, wallet linking, Luca chat, and stablecoin USD pricing#217
danbuildss wants to merge 1 commit into
mainfrom
claude/luca-aeon-skills-caygz-ybmgik

Conversation

@danbuildss

Copy link
Copy Markdown
Owner

Summary

  • Auth fix for Gmail/X users: privy:<id> strings were being written to access_codes (UUID primary key) — silently failing for all Privy-authenticated users. Added routing to the users table (text PK) in /api/access and /api/user/wallet.
  • Unlink wallet: DELETE handler was missing from /api/user/wallet — added it.
  • Luca chat gate removed: Chat was blocked unless a wallet was linked. Gate removed — anyone can chat.
  • Hermes integration: Dashboard chat now proxies to @AskLucaBot via the Hermes API (HERMES_API_URL + HERMES_API_KEY env vars). Consistent with the Telegram bot.
  • Telegram link fix: All bot links corrected to @AskLucaBot (not the community group @asklucaai).
  • Stablecoin USD pricing: Both Alchemy and Etherscan chain providers had valueUsd: undefined hardcoded. Added usd-pricer.ts that prices USDC/USDT/DAI across Base/Ethereum/Arbitrum/Optimism/Polygon deterministically (1:1 peg, raw value ÷ 10^decimals). Fixes financial intelligence snapshots always returning $0.

Before merging

Run this in Supabase SQL editor if the users table doesn't exist yet:

CREATE TABLE IF NOT EXISTS public.users (
  id           text PRIMARY KEY,
  email        text,
  x_handle     text,
  wallet       text,
  last_seen_at timestamptz DEFAULT now(),
  created_at   timestamptz NOT NULL DEFAULT now()
);
ALTER TABLE public.users ENABLE ROW LEVEL SECURITY;

(Skip the policy line if it already exists.)

After merging

Re-index Skopos wallets then re-run the financial intelligence process endpoint to get real USD metrics from stablecoin transactions.


Generated by Claude Code

Both Alchemy and Etherscan providers were setting valueUsd: undefined,
causing all financial intelligence snapshots to show $0 metrics.
Add usd-pricer.ts that computes USD value for known stablecoins
(USDC, USDT, DAI across Base/Ethereum/Arbitrum/Optimism/Polygon)
by dividing rawValue by 10^decimals. Non-stablecoin assets remain
undefined until a price oracle is wired up.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RjpGP3kYKnQuQAUoK6RZky
@vercel

vercel Bot commented Jul 26, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
zetta Ready Ready Preview, Comment Jul 26, 2026 12:13am

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants