Skip to content

Add documentation for implementing wallet additions#17070

Open
minimalsm wants to merge 1 commit into
ethereum:devfrom
minimalsm:docs/agentic-wallet-guidance
Open

Add documentation for implementing wallet additions#17070
minimalsm wants to merge 1 commit into
ethereum:devfrom
minimalsm:docs/agentic-wallet-guidance

Conversation

@minimalsm
Copy link
Copy Markdown
Contributor

Summary

  • Add comprehensive docs/adding-wallets.md guide for implementing wallet additions
  • Update CLAUDE.md with critical requirements section for product additions

This addresses #17069 where AI agents were confidently but incorrectly implementing wallet additions (e.g., omitting required image assets as seen in #17064 vs #17065).

Changes

New: docs/adding-wallets.md

A complete implementation guide covering:

  • Image requirements (PNG format, transparent background, naming conventions)
  • Complete wallet data template with all required fields
  • Reference for supported chain names (must match src/data/chains.ts exactly)
  • Language code reference (ISO 639-1)
  • Common mistakes to avoid (missing images, wrong chain names, platform flag confusion)
  • Step-by-step implementation checklist

Updated: CLAUDE.md

Added "Adding Products" section with critical requirements:

  1. Both assets AND data are required (the key issue from Update Pillar Wallet to PillarX (pillar.fi → pillarx.app) #17064)
  2. Two-step implementation process
  3. Chain name verification guidance
  4. Platform flag accuracy (browser extensions vs mobile apps)
  5. Build verification step

Why This Matters

PR #17064 demonstrates a common AI agent failure mode: confidently implementing partial solutions. The agent added wallet data but missed the required image asset. This documentation makes the two-component requirement explicit and provides a checklist to prevent similar issues.

Fixes #17069

- Add comprehensive docs/adding-wallets.md guide with:
  - Image requirements (format, dimensions, naming)
  - Complete wallet data template with all fields
  - Supported chain names reference
  - Language code reference
  - Common mistakes to avoid
  - Step-by-step checklist
- Update CLAUDE.md with critical requirements section for
  product additions, emphasizing:
  - Both assets AND data are required
  - Two-step implementation process
  - Chain name verification
  - Platform flag accuracy

This addresses confusion around implementing wallet PRs where
agents were omitting required image assets.
@netlify
Copy link
Copy Markdown

netlify Bot commented Jan 12, 2026

Deploy Preview for ethereumorg ready!

Name Link
🔨 Latest commit 0aff285
🔍 Latest deploy log https://app.netlify.com/projects/ethereumorg/deploys/69657f66de9bb4000807b8f1
😎 Deploy Preview https://deploy-preview-17070.ethereum.it
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
7 paths audited
Performance: 54 (🟢 up 2 from production)
Accessibility: 94 (no change from production)
Best Practices: 100 (🟢 up 1 from production)
SEO: 100 (no change from production)
PWA: 54 (🔴 down 5 from production)
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify project configuration.

@github-actions github-actions Bot added the documentation 📖 Change or add documentation label Jan 12, 2026
Comment thread CLAUDE.md
Comment on lines +298 to +300
3. **Verify chain names** - When adding `supported_chains`, use exact names from `src/data/chains.ts`. Common mistakes:
- "Optimism" should be "OP Mainnet"
- "Polygon" could be "Polygon zkEVM" (chainId 1101) - verify the specific chain
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This part feels redundant from above, but claude also didn't follow these instructions:

### Type-Safe Chain Names

This project enforces type-safe chain names via TypeScript. When working with layer 2 networks or wallet data:

**Critical Files:**

- `src/data/chains.ts` - Canonical source of all chain names (auto-updated weekly)
- `src/lib/types.ts` - Defines `ChainName` type derived from chains.ts
- `src/data/networks/networks.ts` - Uses `chainName: ChainName`
- `src/data/wallets/wallet-data.ts` - Uses `supported_chains: ChainName[]`

**Rules:**

1. **Always look up exact names** - Before adding `chainName` or `supported_chains`, search `chains.ts` for the exact `name` value
2. **Names are case-sensitive and exact** - e.g., use `"Zircuit Mainnet"` not `"Zircuit"`, use `"OP Mainnet"` not `"Optimism"`
3. **Run type checking** - Use `npx tsc --noEmit` to verify chain names are valid before committing
4. **Non-EVM chains** - For Starknet and other non-EVM chains, use `NonEVMChainName` type

**Common Mistakes:**

- Using informal names: `"Optimism"` should be `"OP Mainnet"`
- Missing "Mainnet" suffix: `"Zircuit"` should be `"Zircuit Mainnet"`
- Wrong casing: `"zksync Mainnet"` should be `"zkSync Mainnet"`

I would think having this explcitely laid out in the docs/adding-wallets.md file would be best to avoid repeating ourselves in multiple places (e.g., if anything changes, harder to maintain the instructions)

@minimalsm Would you agree? Definitely not picky which we keep, but within this file it seems best to only keep one of these

Comment thread CLAUDE.md
- Browser extension = `chromium: true` and/or `firefox: true`
- Mobile app = `ios: true` and/or `android: true`

5. **Run build verification** - Always run `pnpm build` to catch TypeScript errors before committing
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pnpm build may be a bulky ask given the weight of our repo:

npx tsc --noEmit

This should be funcitonally equivalent, and only takes a couple seconds to run

Suggested change
5. **Run build verification** - Always run `pnpm build` to catch TypeScript errors before committing
5. **Run TypeScript verification** - Always run `npx tsc --noEmit` to catch TypeScript errors before committing

Comment thread docs/adding-wallets.md
import WalletNameImage from "@/public/images/wallets/walletname.png"
```

Import statements are ordered alphabetically by variable name.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we emphasize that this is required for build to pass? npx tsx --noEmit will catch this, so maybe not a big deal

Comment thread docs/adding-wallets.md

### TypeScript Validation

Run the build to check for type errors:
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as above, would recommend npx tsc --noEmit

Suggested change
Run the build to check for type errors:
Run the TypeScript analyzer to check for type errors:

Comment thread docs/adding-wallets.md

Run the build to check for type errors:
```bash
pnpm build
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
pnpm build
npx tsc --noEmit

Comment thread docs/adding-wallets.md
```
**Correct**: Using exact names from chains.ts
```typescript
supported_chains: ["OP Mainnet", "Polygon zkEVM", "Gnosis"],
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lol.. assuming the LLM wrote this, it didn't even check chains.ts for proper examples:

Suggested change
supported_chains: ["OP Mainnet", "Polygon zkEVM", "Gnosis"],
supported_chains: ["OP Mainnet", "Polygon zkEVM"],

Comment thread docs/adding-wallets.md
- [ ] `last_updated` set to today's date
- [ ] Chain names match exactly with `src/data/chains.ts`
- [ ] Platform flags accurately reflect wallet availability
- [ ] `pnpm build` succeeds without errors
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Similar to above, in particular for LLM jobs, asking it to run pnpm build will add bloat. npx tsc --noEmit should suffice for the vast majority of issues we encounter. If that passes, I'd say Netlify can then do the actual building part.

Suggested change
- [ ] `pnpm build` succeeds without errors
- [ ] `npx tsc --noEmit` succeeds without errors

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps an optional step for any other contributors to actually run a full pnpm build and preview to ensure completion and accuracy.

@github-actions
Copy link
Copy Markdown
Contributor

This issue is stale because it has been open 30 days with no activity.

@github-actions github-actions Bot added the Status: Stale This issue is stale because it has been open 30 days with no activity. label Feb 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation 📖 Change or add documentation Status: Stale This issue is stale because it has been open 30 days with no activity.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Agentic guidance for adding wallets/other items

2 participants