-
Notifications
You must be signed in to change notification settings - Fork 619
[SDK] Pass through authorizationList for injected providers #8036
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
[SDK] Pass through authorizationList for injected providers #8036
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
🦋 Changeset detectedLatest commit: ee54772 The changes in this PR will be included in the next version bump. This PR includes changesets to release 3 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
WalkthroughAdds a changeset for a patch release. Updates injected wallet transaction parameter construction to spread the full tx object into eth_sendTransaction params, while retaining existing explicit fields and gas fee handling. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
actor D as DApp
participant IW as Injected Wallet (thirdweb)
participant EP as EIP-1193 Provider
participant CH as Chain Node
D->>IW: sendTransaction(tx)
Note over IW: Build params with {...tx}, gas fees,<br/>from, to, value, nonce, eip712
IW->>EP: ethereum.request({ method: "eth_sendTransaction", params: [txParams] })
EP->>CH: eth_sendTransaction(txParams)
CH-->>EP: tx hash or error
EP-->>IW: result
IW-->>D: result
rect rgba(230, 245, 255, 0.5)
Note over IW: Changed: pass through all tx fields (e.g., authorizationList) via spread
end
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Pre-merge checks (1 passed, 2 warnings)❌ Failed checks (2 warnings)
✅ Passed checks (1 passed)
Warning Review ran into problems🔥 ProblemsErrors were encountered while retrieving linked issues. Errors (1)
✨ Finishing Touches
🧪 Generate unit tests
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. |
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 (4)
.changeset/twelve-ducks-beg.md (1)
5-5: Nit: clarify the scope in the note.Consider mentioning EIP-7702 explicitly and that the tx object is spread to allow
authorizationListpassthrough for injected providers.packages/thirdweb/src/wallets/injected/index.ts (3)
200-211: Confirm override order (eip712 vs normalized fields).
...tx.eip712at the end can overridefrom/gas/feesyou normalize above. If that’s intentional, ignore. If not, move the EIP‑712 spread beforefrom,gas, etc., so normalized values win.
200-211: Data encoding sanity check.You previously mapped numeric fields to hex;
datais now forwarded as-is via...tx. Iftx.datacan be non-hex (e.g., string/bytes), add normalization or document that callers must provide hex.
200-211: StripchainIdfrom eth_sendTransaction params
Destructuretxto omitchainIdbefore spreading intoparams, e.g.:- const params = [ - { - ...tx, + const { chainId: _omitChainId, eip712, ...txRest } = tx; + const params = [ + { + ...txRest, ...gasFees, from: this.address, gas: tx.gas ? numberToHex(tx.gas) : undefined, nonce: tx.nonce ? numberToHex(tx.nonce) : undefined, to: tx.to ? getAddress(tx.to) : undefined, value: tx.value ? numberToHex(tx.value) : undefined, - ...tx.eip712, + ...eip712, }, ];Verify against MetaMask & Coinbase Wallet extensions.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
💡 Knowledge Base configuration:
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (2)
.changeset/twelve-ducks-beg.md(1 hunks)packages/thirdweb/src/wallets/injected/index.ts(1 hunks)
🧰 Additional context used
📓 Path-based instructions (5)
.changeset/*.md
📄 CodeRabbit inference engine (AGENTS.md)
.changeset/*.md: Each change inpackages/*must include a changeset for the appropriate package
Version bump rules: patch for non‑API changes; minor for new/modified public API
Files:
.changeset/twelve-ducks-beg.md
**/*.{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:
packages/thirdweb/src/wallets/injected/index.ts
**/*.{ts,tsx,js,jsx}
📄 CodeRabbit inference engine (CLAUDE.md)
Load heavy dependencies inside async paths to keep initial bundle lean (lazy loading)
Files:
packages/thirdweb/src/wallets/injected/index.ts
packages/thirdweb/src/wallets/**
📄 CodeRabbit inference engine (CLAUDE.md)
packages/thirdweb/src/wallets/**: UnifiedWalletandAccountinterfaces in wallet architecture
Support for in-app wallets (social/email login)
Smart wallets with account abstraction
EIP-1193, EIP-5792, EIP-7702 standard support in wallet modules
Files:
packages/thirdweb/src/wallets/injected/index.ts
packages/thirdweb/**/*.{ts,tsx}
📄 CodeRabbit inference engine (AGENTS.md)
packages/thirdweb/**/*.{ts,tsx}: Every public symbol must have comprehensive TSDoc with at least one compiling@exampleand a custom tag (@beta,@internal,@experimental, etc.)
Comment only ambiguous logic; avoid restating TypeScript in prose
Lazy‑load heavy dependencies inside async paths (e.g.,const { jsPDF } = await import("jspdf"))
Files:
packages/thirdweb/src/wallets/injected/index.ts
🧠 Learnings (2)
📓 Common learnings
Learnt from: CR
PR: thirdweb-dev/js#0
File: AGENTS.md:0-0
Timestamp: 2025-08-29T15:37:38.513Z
Learning: Applies to .changeset/*.md : Version bump rules: patch for non‑API changes; minor for new/modified public API
📚 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:
packages/thirdweb/src/wallets/injected/index.ts
⏰ 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). (8)
- GitHub Check: E2E Tests (pnpm, esbuild)
- GitHub Check: E2E Tests (pnpm, vite)
- GitHub Check: E2E Tests (pnpm, webpack)
- GitHub Check: Size
- GitHub Check: Unit Tests
- GitHub Check: Build Packages
- GitHub Check: Lint Packages
- GitHub Check: Analyze (javascript)
🔇 Additional comments (2)
.changeset/twelve-ducks-beg.md (1)
2-5: Patch bump is appropriate.Change qualifies as a patch (behavioral passthrough; no public API surface change).
packages/thirdweb/src/wallets/injected/index.ts (1)
188-211: Remove suggestion to addauthorizationList
SendTransactionOptionalready extendsSerializableTransaction, which declares an optionalauthorizationListin packages/thirdweb/src/transaction/serialize-transaction.ts:28–30.Likely an incorrect or invalid review comment.

PR-Codex overview
This PR focuses on passing through the
authorizationListfor injected wallet providers in thethirdwebpackage.Detailed summary
packages/thirdweb/src/wallets/injected/index.tsfile.paramsobject to include...txand...gasFees.accessListanddataproperties from theparamsobject.Summary by CodeRabbit
Bug Fixes
Chores