-
Notifications
You must be signed in to change notification settings - Fork 615
[Portal] Add documentation for third-party library adapters #8074
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Portal] Add documentation for third-party library adapters #8074
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
4 Skipped Deployments
|
|
WalkthroughA new documentation page was added for wallets/adapters, detailing interoperability between Thirdweb and external wallet libraries. The wallets sidebar was updated to include a link to this page under Guides. No runtime logic or public API signatures were changed. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✨ Finishing touches
🧪 Generate unit tests
Warning Review ran into problems🔥 ProblemsErrors were encountered while retrieving linked issues. Errors (1)
Comment |
How to use the Graphite Merge QueueAdd either label to this PR to merge it via the merge queue:
You must have a Graphite account in order to use the merge queue. Sign up using this link. An organization admin has enabled the Graphite Merge Queue in this repository. Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue. This stack of pull requests is managed by Graphite. Learn more about stacking. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #8074 +/- ##
=======================================
Coverage 56.35% 56.35%
=======================================
Files 906 906
Lines 59168 59168
Branches 4172 4172
=======================================
Hits 33342 33342
Misses 25720 25720
Partials 106 106
🚀 New features to boost your workflow:
|
size-limit report 📦
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (7)
apps/portal/src/app/wallets/adapters/page.mdx (7)
89-94: Fix incomplete import statement.The code shows an incomplete import on line 96 with a double newline, which may cause issues.
-import { useDisconnect, useSwitchChain, useWalletClient } from 'wagmi' -import { client } from './client' - +import { useDisconnect, useSwitchChain, useWalletClient } from 'wagmi' +import { client } from './client'
97-97: Add missing import for useAccount hook.The
useAccounthook is used but not imported from wagmi.-import { useDisconnect, useSwitchChain, useWalletClient } from 'wagmi' +import { useAccount, useDisconnect, useSwitchChain, useWalletClient } from 'wagmi'
104-107: Add missing chainId variable declaration.The
chainIdvariable is referenced but not declared or imported.+ const chainId = account.chainId; // or get from useChainId() hook const provider = await account?.connector?.getProvider({ chainId, });
134-134: Remove unused ethers5Adapter import.The
ethers5Adapterimport is not used in the Privy example.-import { ethers5Adapter } from 'thirdweb/adapters/ethers5';
207-214: Add missing import and improve code clarity.The
createWalletClientfunction is referenced but not imported. Also, the ellipsis should be replaced with proper parameters or a comment.+import { createWalletClient } from 'viem'; + // convert a viem wallet client to a thirdweb wallet -const walletClient = createWalletClient(...); +const walletClient = createWalletClient({ + // your viem wallet client configuration +});
237-241: Add proper type import and improve code clarity.The
ethers.Signertype should be imported from ethers v6, and the ellipsis should be more descriptive.+import { ethers } from 'ethers'; // v6 + // convert a ethers signer -const signer: ethers.Signer = ...; +const signer: ethers.Signer = /* your ethers v6 signer */;
284-288: Add proper type import and improve code clarity.Similar to the ethers v6 example, the ethers v5 example should have proper imports and clearer placeholder code.
+import { ethers } from 'ethers'; // v5 + // convert an ethers signer to a thirdweb account -const signer: ethers.Signer = ...; +const signer: ethers.Signer = /* your ethers v5 signer */;
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
Disabled knowledge base sources:
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (2)
apps/portal/src/app/wallets/adapters/page.mdx(1 hunks)apps/portal/src/app/wallets/sidebar.tsx(1 hunks)
🧰 Additional context used
📓 Path-based instructions (2)
**/*.{ts,tsx}
📄 CodeRabbit inference engine (CLAUDE.md)
**/*.{ts,tsx}: Write idiomatic TypeScript with explicit function declarations and return types
Limit each file to one stateless, single-responsibility function for clarity
Re-use shared types from@/typesor localtypes.tsbarrels
Prefer type aliases over interface except for nominal shapes
Avoidanyandunknownunless unavoidable; narrow generics when possible
Choose composition over inheritance; leverage utility types (Partial,Pick, etc.)
Comment only ambiguous logic; avoid restating TypeScript in prose
**/*.{ts,tsx}: Use explicit function declarations and explicit return types in TypeScript
Limit each file to one stateless, single‑responsibility function
Re‑use shared types from@/typeswhere applicable
Prefertypealiases overinterfaceexcept for nominal shapes
Avoidanyandunknownunless unavoidable; narrow generics when possible
Prefer composition over inheritance; use utility types (Partial, Pick, etc.)
Lazy‑import optional features and avoid top‑level side‑effects to reduce bundle size
Files:
apps/portal/src/app/wallets/sidebar.tsx
**/*.{ts,tsx,js,jsx}
📄 CodeRabbit inference engine (CLAUDE.md)
Load heavy dependencies inside async paths to keep initial bundle lean (lazy loading)
Files:
apps/portal/src/app/wallets/sidebar.tsx
🧠 Learnings (2)
📓 Common learnings
Learnt from: CR
PR: thirdweb-dev/js#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-18T19:19:55.613Z
Learning: Applies to packages/thirdweb/src/wallets/** : Unified `Wallet` and `Account` interfaces in wallet architecture
Learnt from: CR
PR: thirdweb-dev/js#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-18T19:19:55.613Z
Learning: Applies to packages/thirdweb/src/wallets/** : EIP-1193, EIP-5792, EIP-7702 standard support in wallet modules
📚 Learning: 2025-07-18T19:19:55.613Z
Learnt from: CR
PR: thirdweb-dev/js#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-18T19:19:55.613Z
Learning: Applies to packages/thirdweb/src/wallets/** : EIP-1193, EIP-5792, EIP-7702 standard support in wallet modules
Applied to files:
apps/portal/src/app/wallets/adapters/page.mdx
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
- GitHub Check: Size
- GitHub Check: Analyze (javascript)
🔇 Additional comments (7)
apps/portal/src/app/wallets/sidebar.tsx (1)
68-71: LGTM! Clean addition to navigation structure.The new navigation item is appropriately placed in the Guides section and follows the consistent pattern of using
${walletSlug}for path construction.apps/portal/src/app/wallets/adapters/page.mdx (6)
121-121: Secondary demo repo verified — no action required.Referenced wagmi + thirdweb demo repository is reachable (HTTP 200).
18-26: Demo repo reachable (HTTP 200) — verify the repository contents match the referenced "wagmi + thirdweb" demo and update the href/description if not.
30-32: Package name verified — @thirdweb-dev/wagmi-adapter is used consistently in the repo.
Found in: packages/wagmi-adapter/package.json, packages/wagmi-adapter/CHANGELOG.md, README.md, and docs under apps/portal (e.g. apps/portal/src/app/wallets/adapters/page.mdx); no mismatches detected.
34-34: Verified wagmi minimum version requirementnpm shows wagmi v2.14.1 was published and the latest is v2.17.0 — the line "Make sure you're running wagmi 2.14.1 or above." is accurate; no change required.
1-1: All imported components are present and exported from @doc. Confirmed apps/portal/tsconfig.json maps @doc → ./src/components/Document and apps/portal/src/components/Document/index.ts exports Stack, InstallTabs, Callout, Step, Steps, and GithubTemplateCard.
54-57: EIP-7702 usage is correct –mode: "EIP7702", sponsorGas: trueproperly enables the EIP-7702 gas-sponsorship feature for account abstraction.

PR-Codex overview
This PR introduces new documentation and guidance for integrating the
thirdwebSDK with various libraries, enhancing the user experience by providing detailed usage instructions and examples for adapters, particularly withwagmi,privy, andethers.Detailed summary
sidebar.tsxfor "Usage with other libraries".page.mdxon usingthirdwebwith:wagmi, including setup and wallet connection examples.privy, detailing wallet integration.Summary by CodeRabbit
New Features
Documentation