Skip to content

Dashboard: Remove useThirdwebClient hook #7228

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

Merged
merged 1 commit into from
May 30, 2025

Conversation

MananTank
Copy link
Member

@MananTank MananTank commented May 30, 2025


PR-Codex overview

This PR focuses on enhancing the integration of the ThirdwebClient across various components in the application, ensuring that client instances are consistently passed to functions and components that require them.

Detailed summary

  • Added client prop to multiple components, including NFTMediaWithEmptyState, MarketplaceDetails, and TeamHeaderUI.
  • Updated functions to accept client as a parameter for contract interactions.
  • Refactored useEns and usePublishedContractsQuery to accept client.
  • Adjusted various components to utilize the client prop for improved functionality and consistency.
  • Removed redundant client retrievals from components.

The following files were skipped due to too many changes: apps/dashboard/src/components/contract-components/hooks.ts, apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/connect/account-abstraction/factories/page.tsx, apps/dashboard/src/components/embedded-wallets/Configure/index.tsx, apps/dashboard/src/components/contract-components/contract-publish-form/index.tsx, apps/dashboard/src/components/contract-components/contract-deploy-form/custom-contract.tsx

✨ Ask PR-Codex anything about this PR by commenting with /codex {your question}

Summary by CodeRabbit

  • New Features
    • Many components now accept a client instance as a prop, enabling more explicit and flexible client management throughout the dashboard.
  • Refactor
    • Shifted from internal client initialization to explicit client prop injection across the app, affecting forms, tables, media components, contract publishing, and wallet settings.
    • Updated hooks and utility functions to require a client parameter instead of relying on internal context.
  • Chores
    • Removed unused files and internal hooks related to client management.
  • Bug Fixes
    • Improved consistency and reliability when handling authentication and client context in user flows.

Copy link

changeset-bot bot commented May 30, 2025

⚠️ No Changeset found

Latest commit: 6ae54dd

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link

vercel bot commented May 30, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
thirdweb-www ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 30, 2025 6:58pm
4 Skipped Deployments
Name Status Preview Comments Updated (UTC)
docs-v2 ⬜️ Skipped (Inspect) May 30, 2025 6:58pm
login ⬜️ Skipped (Inspect) May 30, 2025 6:58pm
thirdweb_playground ⬜️ Skipped (Inspect) May 30, 2025 6:58pm
wallet-ui ⬜️ Skipped (Inspect) May 30, 2025 6:58pm

@vercel vercel bot temporarily deployed to Preview – thirdweb_playground May 30, 2025 18:04 Inactive
@vercel vercel bot temporarily deployed to Preview – wallet-ui May 30, 2025 18:04 Inactive
@vercel vercel bot temporarily deployed to Preview – docs-v2 May 30, 2025 18:04 Inactive
@vercel vercel bot temporarily deployed to Preview – login May 30, 2025 18:04 Inactive
Copy link
Contributor

coderabbitai bot commented May 30, 2025

Walkthrough

This change refactors the codebase to remove all internal usage of the useThirdwebClient hook and replaces it with explicit passing of a ThirdwebClient instance as a prop to components and hooks. Related API routes and utility hooks for authentication and client creation are updated or removed. Component and hook signatures are updated throughout to require the client parameter directly, and internal logic is adjusted to use the passed client instance.

Changes

File(s) / Group Change Summary
apps/dashboard/src/@/constants/thirdweb.client.ts, apps/dashboard/src/app/(app)/api/auth/get-auth-token/route.ts Deleted files: removed the useThirdwebClient hook and the API route for fetching auth tokens.
apps/dashboard/src/components/contract-components/, apps/dashboard/src/components/contract-pages/, apps/dashboard/src/components/explore/, apps/dashboard/src/components/smart-wallets/, apps/dashboard/src/components/pay/, apps/dashboard/src/components/selects/, apps/dashboard/src/components/tw-components/, apps/dashboard/src/components/configure-networks/, apps/dashboard/src/components/embedded-wallets/, apps/dashboard/src/hooks/useCsvUpload.ts, apps/dashboard/src/core-ui/batch-upload/, apps/dashboard/src/contract-ui/, apps/dashboard/src/app/(app)/components/, apps/dashboard/src/app/(app)/team/, apps/dashboard/src/app/(app)/(dashboard)/, apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/, apps/dashboard/src/app/(app)/team/components/, etc. Refactored components and hooks to accept a ThirdwebClient instance as a required prop or parameter instead of using useThirdwebClient. Updated all usages, prop interfaces, and internal logic to use the passed client.
apps/dashboard/src/components/contract-components/fetchPublishedContractsFromDeploy.ts, apps/dashboard/src/components/contract-components/hooks.ts Updated to remove explicit client parameter in favor of using contract.client or require passing client directly.
apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/layout.ts, apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/shared-layout.tsx, apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/contract/[chainIdOrSlug]/[contractAddress]/layout.tsx Layout and shared components updated to fetch and pass authentication tokens and client instances as props.
apps/dashboard/src/app/(app)/team/components/HeaderLoggedOut/HeaderLoggedOut.tsx, apps/dashboard/src/app/(app)/components/MobileBurgerMenuButton.tsx, apps/dashboard/src/app/(app)/components/Header/SecondaryNav/account-button.client.tsx, apps/dashboard/src/app/(app)/account/components/AccountHeaderUI.tsx, apps/dashboard/src/app/(app)/team/components/TeamHeader/TeamHeaderUI.tsx Updated header and navigation components to require and pass client props.
apps/dashboard/src/components/contract-components/contract-publish-form/, apps/dashboard/src/components/contract-components/contract-deploy-form/custom-contract.tsx Contract publishing and deployment forms refactored to require client and isLoggedIn props instead of jwt.
apps/dashboard/src/components/contract-components/contract-publish-form/ref-contract-input/, ref-contract-impl-input/, decoded-bytes-input/ Refactored input fieldsets and components to accept and pass client prop for contract publishing inputs.
apps/dashboard/src/components/contract-components/contract-publish-form/custom-factory.tsx Added client argument to useCustomFactoryAbi hook call.
apps/dashboard/src/components/contract-components/publisher/publisher-header.tsx, apps/dashboard/src/components/contract-components/published-contract/index.tsx Updated to accept client prop and remove internal useThirdwebClient hook usage.
apps/dashboard/src/components/contract-components/tables/cells.tsx, apps/dashboard/src/components/contract-components/tables/contract-table.tsx Updated contract table cells and table to accept and pass client prop.
apps/dashboard/src/components/contract-pages/table/table-columns/cells/media-cell.tsx Updated MediaCell component to accept and use client prop.
apps/dashboard/src/components/selects/NetworkSelectorButton.tsx, apps/dashboard/src/components/configure-networks/ConfigureNetworkModal.tsx, ConfigureNetworkForm.tsx, ConfigureNetworks.tsx Network selector and configuration components updated to require and pass client prop.
apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/connect/account-abstraction/factories/page.tsx Added creation and passing of clientThirdwebClient prop through factory components.
apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/connect/in-app-wallets/settings/page.tsx, apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/connect/universal-bridge/settings/page.tsx Pages updated to fetch auth token, create client instance, and pass as prop.
apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/assets/create/distribution/token-airdrop.tsx, token-distribution.tsx Token airdrop and distribution components updated to accept and pass client prop.
apps/dashboard/src/app/(app)/team/components/HeaderLoggedOut/HeaderLoggedOut.stories.tsx, apps/dashboard/src/components/embedded-wallets/Configure/InAppWalletSettingsUI.stories.tsx Storybook stories updated to import and pass explicit client instances.
apps/dashboard/src/components/wallets/PosthogIdentifier.tsx Changed from hook-based client usage to direct client getter function for Posthog identifier.
apps/dashboard/src/contract-ui/components/solidity-inputs/address-input.tsx, index.tsx Solidity input components updated to accept client prop and pass to ENS hook.
apps/dashboard/src/contract-ui/hooks/useContractFunctionComment.ts, useContractSources.ts Removed internal useThirdwebClient usage; rely on contract.client for IPFS downloads.
apps/dashboard/src/core-ui/batch-upload/batch-lazy-mint.tsx, batch-table.tsx Batch upload components updated to accept and pass client prop instead of internal hook usage.
apps/dashboard/src/hooks/useCsvUpload.ts Hook updated to require client prop and remove internal hook usage.
apps/dashboard/src/tw-components/nft-media.tsx NFT media component updated to accept client prop and remove internal hook usage.
apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/(marketplace)/components/list-form.tsx, listing-drawer.tsx, marketplace-table.tsx Marketplace components updated to pass client prop to media components.
apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/_components/NFTCards.tsx, claim-conditions/claim-conditions-form/index.tsx, claim-conditions/snapshot-upload.tsx NFT cards and claim condition components updated to accept and pass client prop.
apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/account/components/nfts-owned.tsx Updated to pass client prop to NFTCards.
apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/nfts/[tokenId]/components/airdrop-tab.tsx, update-metadata-form.tsx, token-id.tsx NFT token components updated to pass client prop to media and airdrop components.
apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/nfts/components/table.tsx NFT table component updated to pass client prop to media cell.
apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/overview/components/MarketplaceDetails.tsx, NFTDetails.tsx, published-by-ui.tsx, published-by.server.tsx Overview components updated to add or remove explicit client prop usage, relying on contract.client where applicable.
apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/modules/components/ModuleForm.tsx Hooks updated to receive client prop in calls to usePublishedContractsQuery and useAllVersions.
apps/dashboard/src/app/(app)/(dashboard)/contracts/publish/[publish_uri]/page.tsx, published-contract/[publisher]/[contract_id]/[version]/page.tsx, published-contract/[publisher]/[contract_id]/page.tsx, published-contract/components/uri-based-deploy.tsx Published contract and publish pages updated to fetch auth token, create client instance, and pass as prop.
apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/contract/[chainIdOrSlug]/[contractAddress]/layout.tsx Added authToken prop to SharedContractLayout invocation.
apps/dashboard/src/app/(app)/team/components/TeamHeader/team-header.tsx Added creation and passing of a client instance for logged-out header rendering, renamed logged-in client variable.
apps/dashboard/src/components/explore/contract-card/index.tsx, explore/publisher/index.tsx Updated to import and pass explicit client prop to ContractPublisher component.
apps/dashboard/src/components/pay/RouteDiscovery.tsx Added client prop and passed it down to NetworkSelectorButton.
apps/dashboard/src/components/smart-wallets/AccountFactories/account-cell.tsx, factory-contracts.tsx Updated hooks and components to accept and pass client prop explicitly.

Sequence Diagram(s)

sequenceDiagram
    participant ParentComponent
    participant ThirdwebClientFactory
    participant ChildComponent
    participant HookOrUtility

    ParentComponent->>ThirdwebClientFactory: getClientThirdwebClient({ jwt, teamId })
    ThirdwebClientFactory-->>ParentComponent: ThirdwebClient instance
    ParentComponent->>ChildComponent: Render with client={ThirdwebClient}
    ChildComponent->>HookOrUtility: Call with client parameter
    HookOrUtility-->>ChildComponent: Data/Result using provided client
Loading
sequenceDiagram
    participant Layout
    participant AuthService
    participant SharedContractLayout
    participant ConfigureCustomChain

    Layout->>AuthService: getAuthToken()
    AuthService-->>Layout: authToken
    Layout->>SharedContractLayout: Render with authToken
    SharedContractLayout->>ThirdwebClientFactory: getClientThirdwebClient({ jwt: authToken, teamId })
    ThirdwebClientFactory-->>SharedContractLayout: ThirdwebClient
    SharedContractLayout->>ConfigureCustomChain: Render with client={ThirdwebClient}
Loading
sequenceDiagram
    participant Parent
    participant Child
    participant NFTMediaWithEmptyState

    Parent->>Child: Pass client={ThirdwebClient}
    Child->>NFTMediaWithEmptyState: Pass client={ThirdwebClient}
    NFTMediaWithEmptyState->>MediaRenderer: Render with client={ThirdwebClient}
Loading

Possibly related PRs

Suggested reviewers

  • MananTank
  • jnsdls

Warning

Review ran into problems

🔥 Problems

Errors were encountered while retrieving linked issues.

Errors (1)
  • TEAM-0000: Entity not found: Issue - Could not find referenced Issue.
✨ Finishing Touches
  • 📝 Generate Docstrings

🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@github-actions github-actions bot added the Dashboard Involves changes to the Dashboard. label May 30, 2025
@MananTank MananTank marked this pull request as ready for review May 30, 2025 18:05
@MananTank MananTank requested review from a team as code owners May 30, 2025 18:05
Copy link
Member Author

MananTank commented May 30, 2025


How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • merge-queue - adds this PR to the back of the merge queue
  • hotfix - for urgent hot fixes, skip the queue and merge this PR next

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.

Copy link
Member Author

@coderabbitai review

Copy link
Contributor

coderabbitai bot commented May 30, 2025

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

Copy link

codecov bot commented May 30, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 55.62%. Comparing base (8245c06) to head (6ae54dd).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #7228   +/-   ##
=======================================
  Coverage   55.62%   55.62%           
=======================================
  Files         908      908           
  Lines       58575    58575           
  Branches     4136     4132    -4     
=======================================
  Hits        32582    32582           
  Misses      25886    25886           
  Partials      107      107           
Flag Coverage Δ
packages 55.62% <ø> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Contributor

github-actions bot commented May 30, 2025

size-limit report 📦

Path Size Loading time (3g) Running time (snapdragon) Total time
thirdweb (esm) 62.14 KB (0%) 1.3 s (0%) 223 ms (+187.15% 🔺) 1.5 s
thirdweb (cjs) 344.83 KB (0%) 6.9 s (0%) 669 ms (+13.07% 🔺) 7.6 s
thirdweb (minimal + tree-shaking) 5.7 KB (0%) 114 ms (0%) 48 ms (+684.83% 🔺) 162 ms
thirdweb/chains (tree-shaking) 531 B (0%) 11 ms (0%) 17 ms (+815.99% 🔺) 27 ms
thirdweb/react (minimal + tree-shaking) 19.52 KB (0%) 391 ms (0%) 66 ms (+558.07% 🔺) 457 ms

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (2)
apps/dashboard/src/contract-ui/components/solidity-inputs/index.tsx (1)

22-22: Remove redundant client prop declaration.

The client prop is already inherited from SolidityInputProps since SolidityInputWithTypeProps extends it. This redundant declaration should be removed.

export interface SolidityInputWithTypeProps extends SolidityInputProps {
  solidityType: string;
-  client: ThirdwebClient;
  solidityName?: string;
apps/dashboard/src/components/contract-components/tables/contract-table.tsx (1)

164-164: Minor: Unrelated formatting change

The blank line addition appears unrelated to the main client prop refactoring objective. While harmless, consider keeping formatting changes separate from functional refactoring for cleaner PR history.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 5fc9198 and e171fb9.

📒 Files selected for processing (85)
  • apps/dashboard/src/@/constants/thirdweb.client.ts (0 hunks)
  • apps/dashboard/src/@3rdweb-sdk/react/components/connect-wallet/index.tsx (1 hunks)
  • apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/(marketplace)/components/list-form.tsx (1 hunks)
  • apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/(marketplace)/components/listing-drawer.tsx (1 hunks)
  • apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/(marketplace)/components/marketplace-table.tsx (1 hunks)
  • apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/_components/NFTCards.tsx (4 hunks)
  • apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/_components/claim-conditions/claim-conditions-form/index.tsx (1 hunks)
  • apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/_components/claim-conditions/snapshot-upload.tsx (4 hunks)
  • apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/_layout/ConfigureCustomChain.tsx (2 hunks)
  • apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/_layout/contract-metadata.tsx (0 hunks)
  • apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/account/components/nfts-owned.tsx (1 hunks)
  • apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/cross-chain/shared-cross-chain-page.tsx (0 hunks)
  • apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/layout.tsx (2 hunks)
  • apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/modules/components/ModuleForm.tsx (2 hunks)
  • apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/nfts/[tokenId]/components/airdrop-tab.tsx (1 hunks)
  • apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/nfts/[tokenId]/components/update-metadata-form.tsx (1 hunks)
  • apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/nfts/[tokenId]/token-id.tsx (1 hunks)
  • apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/nfts/components/table.tsx (1 hunks)
  • apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/overview/components/MarketplaceDetails.tsx (1 hunks)
  • apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/overview/components/NFTDetails.tsx (1 hunks)
  • apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/overview/components/published-by-ui.tsx (3 hunks)
  • apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/overview/components/published-by.server.tsx (0 hunks)
  • apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/shared-layout.tsx (3 hunks)
  • apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/tokens/components/airdrop-form.tsx (1 hunks)
  • apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/tokens/components/airdrop-upload.tsx (4 hunks)
  • apps/dashboard/src/app/(app)/(dashboard)/contracts/publish/[publish_uri]/page.tsx (3 hunks)
  • apps/dashboard/src/app/(app)/(dashboard)/published-contract/[publisher]/[contract_id]/[version]/page.tsx (4 hunks)
  • apps/dashboard/src/app/(app)/(dashboard)/published-contract/[publisher]/[contract_id]/page.tsx (3 hunks)
  • apps/dashboard/src/app/(app)/(dashboard)/published-contract/components/uri-based-deploy.tsx (2 hunks)
  • apps/dashboard/src/app/(app)/account/components/AccountHeaderUI.tsx (1 hunks)
  • apps/dashboard/src/app/(app)/api/auth/get-auth-token/route.ts (0 hunks)
  • apps/dashboard/src/app/(app)/components/Header/SecondaryNav/account-button.client.tsx (1 hunks)
  • apps/dashboard/src/app/(app)/components/MobileBurgerMenuButton.tsx (2 hunks)
  • apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/assets/create/distribution/token-airdrop.tsx (6 hunks)
  • apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/assets/create/distribution/token-distribution.tsx (1 hunks)
  • apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/connect/account-abstraction/factories/page.tsx (7 hunks)
  • apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/connect/in-app-wallets/settings/page.tsx (2 hunks)
  • apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/connect/universal-bridge/settings/page.tsx (4 hunks)
  • apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/contract/[chainIdOrSlug]/[contractAddress]/layout.tsx (1 hunks)
  • apps/dashboard/src/app/(app)/team/components/HeaderLoggedOut/HeaderLoggedOut.stories.tsx (2 hunks)
  • apps/dashboard/src/app/(app)/team/components/HeaderLoggedOut/HeaderLoggedOut.tsx (3 hunks)
  • apps/dashboard/src/app/(app)/team/components/TeamHeader/TeamHeaderUI.tsx (1 hunks)
  • apps/dashboard/src/app/(app)/team/components/TeamHeader/team-header.tsx (2 hunks)
  • apps/dashboard/src/components/configure-networks/ConfigureNetworkForm.tsx (3 hunks)
  • apps/dashboard/src/components/configure-networks/ConfigureNetworkModal.tsx (3 hunks)
  • apps/dashboard/src/components/configure-networks/ConfigureNetworks.tsx (4 hunks)
  • apps/dashboard/src/components/contract-components/contract-deploy-form/custom-contract.tsx (23 hunks)
  • apps/dashboard/src/components/contract-components/contract-publish-form/contract-params-fieldset.tsx (1 hunks)
  • apps/dashboard/src/components/contract-components/contract-publish-form/custom-factory.tsx (1 hunks)
  • apps/dashboard/src/components/contract-components/contract-publish-form/decoded-bytes-input/decoded-input-array-fieldset.tsx (2 hunks)
  • apps/dashboard/src/components/contract-components/contract-publish-form/decoded-bytes-input/decoded-input-set.tsx (2 hunks)
  • apps/dashboard/src/components/contract-components/contract-publish-form/decoded-bytes-input/decoded-input.tsx (2 hunks)
  • apps/dashboard/src/components/contract-components/contract-publish-form/decoded-bytes-input/ref-bytes-input-fieldset.tsx (2 hunks)
  • apps/dashboard/src/components/contract-components/contract-publish-form/decoded-bytes-input/ref-bytes-input.tsx (4 hunks)
  • apps/dashboard/src/components/contract-components/contract-publish-form/impl-params-fieldset.tsx (1 hunks)
  • apps/dashboard/src/components/contract-components/contract-publish-form/index.tsx (7 hunks)
  • apps/dashboard/src/components/contract-components/contract-publish-form/landing-fieldset.tsx (2 hunks)
  • apps/dashboard/src/components/contract-components/contract-publish-form/ref-contract-impl-input/ref-input-impl-fieldset.tsx (2 hunks)
  • apps/dashboard/src/components/contract-components/contract-publish-form/ref-contract-impl-input/ref-input-impl.tsx (2 hunks)
  • apps/dashboard/src/components/contract-components/contract-publish-form/ref-contract-input/ref-input-fieldset.tsx (2 hunks)
  • apps/dashboard/src/components/contract-components/contract-publish-form/ref-contract-input/ref-input.tsx (2 hunks)
  • apps/dashboard/src/components/contract-components/fetchPublishedContractsFromDeploy.ts (5 hunks)
  • apps/dashboard/src/components/contract-components/hooks.ts (4 hunks)
  • apps/dashboard/src/components/contract-components/published-contract/index.tsx (2 hunks)
  • apps/dashboard/src/components/contract-components/publisher/publisher-header.tsx (2 hunks)
  • apps/dashboard/src/components/contract-components/tables/cells.tsx (3 hunks)
  • apps/dashboard/src/components/contract-components/tables/contract-table.tsx (2 hunks)
  • apps/dashboard/src/components/contract-pages/table/table-columns/cells/media-cell.tsx (1 hunks)
  • apps/dashboard/src/components/embedded-wallets/Configure/InAppWalletSettingsUI.stories.tsx (2 hunks)
  • apps/dashboard/src/components/embedded-wallets/Configure/index.tsx (8 hunks)
  • apps/dashboard/src/components/explore/contract-card/index.tsx (2 hunks)
  • apps/dashboard/src/components/explore/publisher/index.tsx (2 hunks)
  • apps/dashboard/src/components/pay/RouteDiscovery.tsx (2 hunks)
  • apps/dashboard/src/components/selects/NetworkSelectorButton.tsx (4 hunks)
  • apps/dashboard/src/components/smart-wallets/AccountFactories/account-cell.tsx (2 hunks)
  • apps/dashboard/src/components/smart-wallets/AccountFactories/factory-contracts.tsx (5 hunks)
  • apps/dashboard/src/components/wallets/PosthogIdentifier.tsx (2 hunks)
  • apps/dashboard/src/contract-ui/components/solidity-inputs/address-input.tsx (2 hunks)
  • apps/dashboard/src/contract-ui/components/solidity-inputs/index.tsx (1 hunks)
  • apps/dashboard/src/contract-ui/hooks/useContractFunctionComment.ts (1 hunks)
  • apps/dashboard/src/contract-ui/hooks/useContractSources.ts (1 hunks)
  • apps/dashboard/src/core-ui/batch-upload/batch-lazy-mint.tsx (1 hunks)
  • apps/dashboard/src/core-ui/batch-upload/batch-table.tsx (6 hunks)
  • apps/dashboard/src/hooks/useCsvUpload.ts (2 hunks)
  • apps/dashboard/src/tw-components/nft-media.tsx (3 hunks)
💤 Files with no reviewable changes (5)
  • apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/overview/components/published-by.server.tsx
  • apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/_layout/contract-metadata.tsx
  • apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/cross-chain/shared-cross-chain-page.tsx
  • apps/dashboard/src/@/constants/thirdweb.client.ts
  • apps/dashboard/src/app/(app)/api/auth/get-auth-token/route.ts
🧰 Additional context used
🧠 Learnings (10)
apps/dashboard/src/components/explore/contract-card/index.tsx (1)
Learnt from: MananTank
PR: thirdweb-dev/js#7227
File: apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/modules/components/OpenEditionMetadata.tsx:26-26
Timestamp: 2025-05-30T17:14:25.307Z
Learning: The ModuleCardUIProps interface already includes a client prop of type ThirdwebClient, so when components use `Omit<ModuleCardUIProps, "children" | "updateButton">`, they inherit the client prop without needing to add it explicitly.
apps/dashboard/src/components/configure-networks/ConfigureNetworks.tsx (1)
Learnt from: MananTank
PR: thirdweb-dev/js#7227
File: apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/modules/components/OpenEditionMetadata.tsx:26-26
Timestamp: 2025-05-30T17:14:25.307Z
Learning: The ModuleCardUIProps interface already includes a client prop of type ThirdwebClient, so when components use `Omit<ModuleCardUIProps, "children" | "updateButton">`, they inherit the client prop without needing to add it explicitly.
apps/dashboard/src/tw-components/nft-media.tsx (1)
Learnt from: MananTank
PR: thirdweb-dev/js#7227
File: apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/modules/components/OpenEditionMetadata.tsx:26-26
Timestamp: 2025-05-30T17:14:25.307Z
Learning: The ModuleCardUIProps interface already includes a client prop of type ThirdwebClient, so when components use `Omit<ModuleCardUIProps, "children" | "updateButton">`, they inherit the client prop without needing to add it explicitly.
apps/dashboard/src/components/configure-networks/ConfigureNetworkModal.tsx (1)
Learnt from: MananTank
PR: thirdweb-dev/js#7227
File: apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/modules/components/OpenEditionMetadata.tsx:26-26
Timestamp: 2025-05-30T17:14:25.307Z
Learning: The ModuleCardUIProps interface already includes a client prop of type ThirdwebClient, so when components use `Omit<ModuleCardUIProps, "children" | "updateButton">`, they inherit the client prop without needing to add it explicitly.
apps/dashboard/src/components/selects/NetworkSelectorButton.tsx (1)
Learnt from: MananTank
PR: thirdweb-dev/js#7227
File: apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/modules/components/OpenEditionMetadata.tsx:26-26
Timestamp: 2025-05-30T17:14:25.307Z
Learning: The ModuleCardUIProps interface already includes a client prop of type ThirdwebClient, so when components use `Omit<ModuleCardUIProps, "children" | "updateButton">`, they inherit the client prop without needing to add it explicitly.
apps/dashboard/src/components/configure-networks/ConfigureNetworkForm.tsx (1)
Learnt from: MananTank
PR: thirdweb-dev/js#7227
File: apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/modules/components/OpenEditionMetadata.tsx:26-26
Timestamp: 2025-05-30T17:14:25.307Z
Learning: The ModuleCardUIProps interface already includes a client prop of type ThirdwebClient, so when components use `Omit<ModuleCardUIProps, "children" | "updateButton">`, they inherit the client prop without needing to add it explicitly.
apps/dashboard/src/contract-ui/components/solidity-inputs/index.tsx (1)
Learnt from: MananTank
PR: thirdweb-dev/js#7227
File: apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/modules/components/OpenEditionMetadata.tsx:26-26
Timestamp: 2025-05-30T17:14:25.307Z
Learning: The ModuleCardUIProps interface already includes a client prop of type ThirdwebClient, so when components use `Omit<ModuleCardUIProps, "children" | "updateButton">`, they inherit the client prop without needing to add it explicitly.
apps/dashboard/src/components/embedded-wallets/Configure/index.tsx (1)
Learnt from: MananTank
PR: thirdweb-dev/js#7227
File: apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/modules/components/OpenEditionMetadata.tsx:26-26
Timestamp: 2025-05-30T17:14:25.307Z
Learning: The ModuleCardUIProps interface already includes a client prop of type ThirdwebClient, so when components use `Omit<ModuleCardUIProps, "children" | "updateButton">`, they inherit the client prop without needing to add it explicitly.
apps/dashboard/src/components/contract-components/contract-deploy-form/custom-contract.tsx (1)
Learnt from: MananTank
PR: thirdweb-dev/js#7227
File: apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/modules/components/OpenEditionMetadata.tsx:26-26
Timestamp: 2025-05-30T17:14:25.307Z
Learning: The ModuleCardUIProps interface already includes a client prop of type ThirdwebClient, so when components use `Omit<ModuleCardUIProps, "children" | "updateButton">`, they inherit the client prop without needing to add it explicitly.
apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/_components/NFTCards.tsx (1)
Learnt from: MananTank
PR: thirdweb-dev/js#7227
File: apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/modules/components/OpenEditionMetadata.tsx:26-26
Timestamp: 2025-05-30T17:14:25.307Z
Learning: The ModuleCardUIProps interface already includes a client prop of type ThirdwebClient, so when components use `Omit<ModuleCardUIProps, "children" | "updateButton">`, they inherit the client prop without needing to add it explicitly.
🧬 Code Graph Analysis (30)
apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/assets/create/distribution/token-distribution.tsx (1)
apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/assets/create/distribution/token-airdrop.tsx (1)
  • TokenAirdropSection (49-188)
apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/nfts/components/table.tsx (1)
apps/dashboard/src/components/contract-pages/table/table-columns/cells/media-cell.tsx (1)
  • MediaCell (12-25)
apps/dashboard/src/components/explore/contract-card/index.tsx (1)
apps/dashboard/src/@/constants/thirdweb-client.client.ts (1)
  • getClientThirdwebClient (3-11)
apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/overview/components/MarketplaceDetails.tsx (1)
packages/engine/src/client/client.gen.ts (1)
  • client (24-28)
apps/dashboard/src/components/embedded-wallets/Configure/InAppWalletSettingsUI.stories.tsx (1)
apps/dashboard/src/stories/utils.tsx (1)
  • storybookThirdwebClient (47-50)
apps/dashboard/src/@3rdweb-sdk/react/components/connect-wallet/index.tsx (1)
packages/engine/src/client/client.gen.ts (1)
  • client (24-28)
apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/modules/components/ModuleForm.tsx (1)
apps/dashboard/src/components/contract-components/hooks.ts (1)
  • usePublishedContractsQuery (108-118)
apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/nfts/[tokenId]/token-id.tsx (1)
apps/dashboard/src/tw-components/nft-media.tsx (1)
  • NFTMediaWithEmptyState (8-63)
apps/dashboard/src/components/wallets/PosthogIdentifier.tsx (2)
packages/engine/src/client/client.gen.ts (1)
  • client (24-28)
apps/dashboard/src/@/constants/thirdweb-client.client.ts (1)
  • getClientThirdwebClient (3-11)
apps/dashboard/src/app/(app)/(dashboard)/published-contract/[publisher]/[contract_id]/page.tsx (3)
apps/dashboard/src/app/(app)/account/settings/getAccount.ts (1)
  • getRawAccount (11-38)
apps/dashboard/src/app/(app)/api/lib/getAuthToken.ts (1)
  • getAuthToken (6-14)
apps/dashboard/src/@/constants/thirdweb-client.client.ts (1)
  • getClientThirdwebClient (3-11)
apps/dashboard/src/app/(app)/team/components/HeaderLoggedOut/HeaderLoggedOut.stories.tsx (2)
apps/dashboard/src/app/(app)/team/components/HeaderLoggedOut/HeaderLoggedOut.tsx (1)
  • HeaderLoggedOut (84-94)
apps/dashboard/src/stories/utils.tsx (1)
  • storybookThirdwebClient (47-50)
apps/dashboard/src/app/(app)/(dashboard)/published-contract/[publisher]/[contract_id]/[version]/page.tsx (3)
apps/dashboard/src/app/(app)/api/lib/getAuthToken.ts (1)
  • getAuthToken (6-14)
apps/dashboard/src/app/(app)/account/settings/getAccount.ts (1)
  • getRawAccount (11-38)
apps/dashboard/src/@/constants/thirdweb-client.client.ts (1)
  • getClientThirdwebClient (3-11)
apps/dashboard/src/app/(app)/components/Header/SecondaryNav/account-button.client.tsx (1)
apps/dashboard/src/components/contract-components/hooks.ts (1)
  • useEns (179-185)
apps/dashboard/src/components/contract-components/contract-publish-form/decoded-bytes-input/decoded-input-array-fieldset.tsx (1)
apps/dashboard/src/components/contract-components/contract-publish-form/decoded-bytes-input/decoded-input-set.tsx (1)
  • DecodedInputSet (21-95)
apps/dashboard/src/components/contract-components/contract-publish-form/contract-params-fieldset.tsx (2)
apps/dashboard/src/components/contract-components/contract-publish-form/ref-contract-input/ref-input-fieldset.tsx (1)
  • RefInputFieldset (14-65)
apps/dashboard/src/components/contract-components/contract-publish-form/decoded-bytes-input/decoded-input-array-fieldset.tsx (1)
  • DecodedInputArrayFieldset (21-94)
apps/dashboard/src/app/(app)/components/MobileBurgerMenuButton.tsx (2)
packages/thirdweb/src/exports/thirdweb.ts (1)
  • ThirdwebClient (26-26)
apps/dashboard/src/components/contract-components/hooks.ts (1)
  • useEns (179-185)
apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/shared-layout.tsx (2)
apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/_layout/ConfigureCustomChain.tsx (1)
  • ConfigureCustomChain (11-71)
apps/dashboard/src/@/constants/thirdweb-client.client.ts (1)
  • getClientThirdwebClient (3-11)
apps/dashboard/src/components/contract-components/contract-publish-form/custom-factory.tsx (1)
packages/engine/src/client/client.gen.ts (1)
  • client (24-28)
apps/dashboard/src/contract-ui/components/solidity-inputs/address-input.tsx (1)
apps/dashboard/src/components/contract-components/hooks.ts (1)
  • useEns (179-185)
apps/dashboard/src/components/contract-components/contract-publish-form/ref-contract-input/ref-input.tsx (1)
apps/dashboard/src/components/contract-components/hooks.ts (1)
  • usePublishedContractsQuery (108-118)
apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/connect/account-abstraction/factories/page.tsx (3)
packages/engine/src/client/client.gen.ts (1)
  • client (24-28)
apps/dashboard/src/@/constants/thirdweb-client.client.ts (1)
  • getClientThirdwebClient (3-11)
packages/thirdweb/src/exports/thirdweb.ts (1)
  • ThirdwebClient (26-26)
apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/tokens/components/airdrop-upload.tsx (2)
packages/thirdweb/src/exports/thirdweb.ts (1)
  • ThirdwebClient (26-26)
apps/dashboard/src/hooks/useCsvUpload.ts (1)
  • useCsvUpload (94-174)
apps/dashboard/src/app/(app)/(dashboard)/contracts/publish/[publish_uri]/page.tsx (1)
apps/dashboard/src/@/constants/thirdweb-client.client.ts (1)
  • getClientThirdwebClient (3-11)
apps/dashboard/src/contract-ui/components/solidity-inputs/index.tsx (1)
packages/thirdweb/src/exports/thirdweb.ts (1)
  • ThirdwebClient (26-26)
apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/_components/claim-conditions/snapshot-upload.tsx (2)
packages/thirdweb/src/exports/thirdweb.ts (1)
  • ThirdwebClient (26-26)
apps/dashboard/src/hooks/useCsvUpload.ts (1)
  • useCsvUpload (94-174)
apps/dashboard/src/components/embedded-wallets/Configure/index.tsx (2)
packages/thirdweb/src/exports/thirdweb.ts (1)
  • ThirdwebClient (26-26)
packages/thirdweb/src/exports/storage.ts (1)
  • upload (1-1)
apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/(marketplace)/components/marketplace-table.tsx (1)
apps/dashboard/src/components/contract-pages/table/table-columns/cells/media-cell.tsx (1)
  • MediaCell (12-25)
apps/dashboard/src/components/contract-components/contract-deploy-form/custom-contract.tsx (3)
packages/thirdweb/src/exports/thirdweb.ts (1)
  • ThirdwebClient (26-26)
apps/dashboard/src/components/contract-components/contract-deploy-form/split-fieldset.tsx (1)
  • SplitFieldset (22-129)
apps/dashboard/src/components/contract-components/contract-deploy-form/trusted-forwarders-fieldset.tsx (1)
  • TrustedForwardersFieldset (15-60)
apps/dashboard/src/components/contract-components/publisher/publisher-header.tsx (2)
packages/thirdweb/src/exports/thirdweb.ts (1)
  • ThirdwebClient (26-26)
apps/dashboard/src/components/contract-components/hooks.ts (1)
  • useEns (179-185)
apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/assets/create/distribution/token-airdrop.tsx (2)
packages/thirdweb/src/exports/thirdweb.ts (1)
  • ThirdwebClient (26-26)
apps/dashboard/src/hooks/useCsvUpload.ts (1)
  • useCsvUpload (94-174)
⏰ Context from checks skipped due to timeout of 90000ms (3)
  • GitHub Check: Graphite / mergeability_check
  • GitHub Check: Graphite / mergeability_check
  • GitHub Check: Size
🔇 Additional comments (155)
apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/nfts/[tokenId]/components/update-metadata-form.tsx (1)

255-255: LGTM! Clean dependency injection pattern.

This change correctly adds the required client prop to NFTMediaWithEmptyState, following the systematic refactor to remove internal useThirdwebClient hook usage in favor of explicit client passing. This improves testability and dependency management.

apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/nfts/[tokenId]/components/airdrop-tab.tsx (1)

138-138: Excellent implementation of explicit dependency injection.

The addition of client={contract.client} to the AirdropUpload component aligns perfectly with the systematic refactor to eliminate internal useThirdwebClient hook usage. This change ensures the component receives the necessary client context while improving code maintainability.

apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/_components/claim-conditions/claim-conditions-form/index.tsx (1)

531-531: Consistent implementation of the client dependency pattern.

This change correctly adds the client={contract.client} prop to SnapshotViewerSheet, maintaining consistency with the broader refactor to replace internal hook-based client acquisition with explicit prop passing. The implementation properly leverages the available contract context.

apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/nfts/[tokenId]/token-id.tsx (1)

129-133: Perfect adherence to the systematic client prop refactor.

The addition of client={contract.client} to NFTMediaWithEmptyState is executed correctly and aligns with the component's updated interface requirements. As shown in the relevant code snippets, this component now requires the client prop to pass to its internal MediaRenderer, making this change essential for proper functionality.

apps/dashboard/src/app/(app)/team/components/TeamHeader/TeamHeaderUI.tsx (1)

213-213: LGTM! Consistent with the explicit client dependency pattern.

This change correctly adds the client prop to MobileBurgerMenuButton, maintaining consistency with other components in the file that already receive the client prop explicitly.

apps/dashboard/src/@3rdweb-sdk/react/components/connect-wallet/index.tsx (1)

201-201: LGTM! Proper client dependency injection.

The change correctly passes the client instance to LazyConfigureNetworkModal, following the established pattern of explicit dependency injection throughout the codebase.

apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/(marketplace)/components/list-form.tsx (1)

562-562: LGTM! Correct client prop addition for NFT media rendering.

The change properly passes contract.client to NFTMediaWithEmptyState, ensuring the component has explicit access to the ThirdwebClient instance for NFT media rendering.

apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/(marketplace)/components/listing-drawer.tsx (1)

54-54: LGTM! Consistent client prop addition for NFT media display.

The change correctly passes contract.client to NFTMediaWithEmptyState, maintaining consistency with the explicit client dependency pattern used throughout the PR and with other components in this file.

apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/overview/components/MarketplaceDetails.tsx (1)

347-347: LGTM! Correct implementation of explicit client prop passing.

This change correctly adds the client prop to NFTMediaWithEmptyState, aligning with the broader refactor to remove useThirdwebClient hook usage and pass the ThirdwebClient instance explicitly through component props.

apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/tokens/components/airdrop-form.tsx (1)

100-100: LGTM! Consistent with the client prop refactor pattern.

This change correctly passes the client from contract.client to the AirdropUpload component, maintaining consistency with the broader refactor to eliminate internal useThirdwebClient hook usage.

apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/account/components/nfts-owned.tsx (1)

30-30: LGTM! Proper implementation of the client prop pattern.

This change correctly adds the client prop to NFTCards using contract.client, following the established pattern of explicit client dependency injection to replace internal hook usage.

apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/assets/create/distribution/token-distribution.tsx (1)

63-63: LGTM! Required prop addition for component compatibility.

This change correctly passes the client prop from the parent component to TokenAirdropSection. Based on the relevant code snippet showing TokenAirdropSection's interface, this client prop is required for the component to function properly after the refactor.

apps/dashboard/src/components/explore/contract-card/index.tsx (1)

5-5: LGTM! Client prop correctly added to ContractPublisher.

The changes properly implement the refactoring pattern by importing getClientThirdwebClient and passing the client instance to the ContractPublisher component. This replaces the internal useThirdwebClient hook usage with explicit prop passing.

Also applies to: 206-206

apps/dashboard/src/core-ui/batch-upload/batch-lazy-mint.tsx (1)

196-196: LGTM! Client prop correctly passed to BatchTable.

The change properly passes the client prop from BatchLazyMint to the BatchTable component, maintaining consistency with the refactoring pattern of explicit client prop passing.

apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/_layout/ConfigureCustomChain.tsx (1)

9-9: LGTM! ConfigureCustomChain properly updated with client prop.

The changes correctly implement the refactoring pattern by:

  • Adding the ThirdwebClient type import
  • Adding client as a required prop to the component interface
  • Passing the client prop down to the ConfigureNetworks component

This maintains consistency with the broader refactoring effort to remove internal useThirdwebClient hook usage.

Also applies to: 13-13, 66-66

apps/dashboard/src/app/(app)/team/components/HeaderLoggedOut/HeaderLoggedOut.stories.tsx (1)

2-5: LGTM! Storybook properly updated with client prop.

The changes correctly update the Storybook story to provide the required client prop to the HeaderLoggedOut component using storybookThirdwebClient. This ensures the component renders properly in Storybook with the new prop requirements from the refactoring.

Also applies to: 40-40

apps/dashboard/src/components/embedded-wallets/Configure/InAppWalletSettingsUI.stories.tsx (2)

4-4: LGTM: Proper import addition for client prop.

The import of storybookThirdwebClient is correctly added to support the new client prop requirement.


58-58: LGTM: Client prop correctly added to story component.

The client={storybookThirdwebClient} prop is properly passed to align with the component's updated API that now requires explicit client passing instead of using the useThirdwebClient hook internally.

apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/contract/[chainIdOrSlug]/[contractAddress]/layout.tsx (1)

76-76: LGTM: Auth token correctly passed to SharedContractLayout.

The authToken prop is properly added to enable SharedContractLayout to create an authenticated client instance, aligning with the refactoring pattern of explicit authentication context passing.

apps/dashboard/src/app/(app)/components/Header/SecondaryNav/account-button.client.tsx (1)

27-30: LGTM: Hook call correctly updated to new signature.

The useEns hook call is properly updated to pass an object with addressOrEnsName and client properties, matching the new hook signature that requires explicit client passing instead of using useThirdwebClient internally.

apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/overview/components/NFTDetails.tsx (1)

70-70: LGTM: Client prop correctly propagated to NFTCards.

The client={contract.client} prop is properly added to pass the ThirdwebClient instance down to the NFTCards component, maintaining consistent client context throughout the component hierarchy as part of the refactoring effort.

apps/dashboard/src/contract-ui/components/solidity-inputs/index.tsx (2)

18-18: LGTM! Client prop added to interface.

The addition of the client prop to SolidityInputProps interface aligns with the refactoring objectives to pass ThirdwebClient explicitly.


56-75:

✅ Verification successful

Verify client prop is passed to child components.

The component receives a client prop but doesn't explicitly pass it to the child SolidityRawInput component. Ensure all child solidity input components receive the client prop if they need it.


🏁 Script executed:

#!/bin/bash
# Description: Check if SolidityRawInput and other child components expect a client prop

# Check SolidityRawInput interface/props
ast-grep --pattern 'interface $_Props {
  $$$
  client: ThirdwebClient;
  $$$
}'

# Check if child components are using client prop
rg -A 10 "SolidityRawInput|SolidityIntInput|SolidityTupleInput|SolidityAddressInput|SolidityStringInput|SolidityBytesInput|SolidityBoolInput" --type tsx

Length of output: 265


To ensure we didn’t miss any client-related props in the child components, let’s search all the .tsx files under apps/dashboard/src/contract-ui/components/solidity-inputs for any declaration or use of client. We’ll also look for any Props interfaces to see if client is defined there.


🏁 Script executed:

#!/bin/bash
# 1) Search all solidity-inputs .tsx files for any 'client' occurrences
find apps/dashboard/src/contract-ui/components/solidity-inputs -type f -name '*.tsx' -print0 | xargs -0 rg -n "client"

# 2) Search for Props interface definitions (to see if they declare a client prop)
find apps/dashboard/src/contract-ui/components/solidity-inputs -type f -name '*.tsx' -print0 | xargs -0 rg -n "interface .*Props" -A5

Length of output: 2788


Let’s inspect all the rendering branches in index.tsx to confirm every child receives ...inputProps (and thus client):


🏁 Script executed:

#!/bin/bash
# 1. List every place a Solidity*Input component is used in index.tsx
grep -Rn "<Solidity.*Input" apps/dashboard/src/contract-ui/components/solidity-inputs/index.tsx

# 2. Dump the first 200 lines of index.tsx with line numbers for context
nl -ba apps/dashboard/src/contract-ui/components/solidity-inputs/index.tsx | sed -n '1,200p'

Length of output: 575


To confirm every child receives client via {...inputProps}, let’s dump the relevant code block:


🏁 Script executed:

#!/bin/bash
# Print lines 60–140 of the index.tsx to inspect all <Solidity*Input /> usages
sed -n '60,140p' apps/dashboard/src/contract-ui/components/solidity-inputs/index.tsx

Length of output: 1638


No changes needed—client is forwarded via ...inputProps.

All child components that require the client prop (e.g. SolidityAddressInput and SolidityStringInput) destructure and use it, and every branch in index.tsx spreads ...inputProps (which includes client). No explicit pass-through is necessary.

apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/nfts/components/table.tsx (1)

78-78: LGTM! Client prop correctly passed to MediaCell.

The explicit passing of client={contract.client} to the MediaCell component aligns perfectly with the refactoring objectives. This ensures the component receives the ThirdwebClient instance directly instead of relying on internal hooks.

apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/modules/components/ModuleForm.tsx (2)

72-75: LGTM! Hook call updated to new signature.

The usePublishedContractsQuery call has been correctly updated to pass an object with client and address properties, matching the hook's new signature shown in the relevant code snippets.


89-93: LGTM! Client parameter added to useAllVersions.

The useAllVersions hook call has been correctly updated to include the client parameter, aligning with the refactoring pattern to pass the ThirdwebClient instance explicitly.

apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/layout.tsx (3)

2-2: LGTM! Authentication import added.

The import of getAuthToken function supports the authentication enhancement in this component.


15-15: LGTM! Concurrent fetching improves performance.

Using Promise.all to concurrently fetch params and authToken is an excellent optimization that reduces the overall loading time.


21-21: LGTM! Authentication token passed to layout.

Passing the authToken to SharedContractLayout enables proper authentication context propagation, which supports the creation of authenticated ThirdwebClient instances downstream.

apps/dashboard/src/components/configure-networks/ConfigureNetworkModal.tsx (1)

2-2: LGTM: Clean client prop threading implementation

The changes correctly implement the client prop pattern:

  • Proper import of ThirdwebClient type
  • Extension of props interface to include required client prop
  • Correct propagation to child ConfigureNetworks component

This aligns with the PR objective of removing internal useThirdwebClient usage.

Also applies to: 14-14, 35-35

apps/dashboard/src/app/(app)/account/components/AccountHeaderUI.tsx (1)

134-134: LGTM: Correct client prop propagation

The change properly passes the client prop down to MobileBurgerMenuButton, maintaining consistency with the refactoring pattern across the codebase.

apps/dashboard/src/components/contract-components/contract-publish-form/impl-params-fieldset.tsx (1)

142-142: LGTM: Proper client prop forwarding

The change correctly forwards the client prop to the RefInputImplFieldset component, maintaining the consistent pattern of explicit client dependency management.

apps/dashboard/src/components/contract-components/tables/contract-table.tsx (1)

184-184: LGTM: Correct client prop threading to table cells

The changes properly pass the client prop to both ContractNameCell and ContractTypeCell components, maintaining consistency with the refactoring pattern.

Also applies to: 192-192

apps/dashboard/src/contract-ui/components/solidity-inputs/address-input.tsx (1)

15-15: LGTM! Client prop threading implemented correctly.

The component now properly accepts a client prop and passes it to the useEns hook using the expected object structure. This change aligns with the refactoring objective to remove internal useThirdwebClient usage.

Also applies to: 25-28

apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/connect/universal-bridge/settings/page.tsx (2)

19-29: LGTM! Proper authentication flow implemented.

The concurrent fetching of auth token with project/team data and the login redirect for missing tokens follows good practices for authenticated pages.


60-63: LGTM! Client creation and prop passing implemented correctly.

The client is properly created using the fetched auth token and team ID, then passed to the RouteDiscovery component as expected.

Also applies to: 75-75

apps/dashboard/src/components/contract-components/contract-publish-form/ref-contract-impl-input/ref-input-impl-fieldset.tsx (1)

5-5: LGTM! Client prop threading implemented correctly.

The component properly accepts the client prop and passes it down to each RefContractImplInput child component. This follows the consistent pattern used throughout the refactoring.

Also applies to: 11-11, 16-16, 36-36

apps/dashboard/src/components/configure-networks/ConfigureNetworks.tsx (1)

3-3: LGTM! Client prop threading implemented correctly.

The component properly accepts the client prop and passes it to ConfigureNetworkForm in both editing and adding scenarios, maintaining consistent behavior across all code paths.

Also applies to: 28-28, 70-70, 80-80

apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/(marketplace)/components/marketplace-table.tsx (1)

102-102: LGTM! Correct client prop passing.

The change properly passes the ThirdwebClient instance from the contract to the MediaCell component, which aligns with the broader refactor to remove internal useThirdwebClient hook usage and pass clients explicitly as props.

apps/dashboard/src/components/pay/RouteDiscovery.tsx (1)

23-23: LGTM! Proper client prop implementation.

The changes correctly implement the client prop pattern:

  • Added proper TypeScript typing for the ThirdwebClient
  • Updated component signature to require the client prop
  • Passes the client down to NetworkSelectorButton component

This aligns with the broader refactor to make client dependencies explicit rather than relying on internal hooks.

Also applies to: 27-33, 143-143

apps/dashboard/src/contract-ui/hooks/useContractFunctionComment.ts (1)

81-81: LGTM! Improved client usage pattern.

Excellent change! Using contract.client directly instead of calling useThirdwebClient() is more efficient and logical since the contract already contains the associated client instance. This eliminates an unnecessary hook dependency while maintaining the same functionality.

apps/dashboard/src/components/wallets/PosthogIdentifier.tsx (1)

3-3:

❌ Incorrect review comment

Verify client authentication requirements.

The change from useThirdwebClient() hook to module-level getClientThirdwebClient() call removes any potential authentication context (JWT/team ID) that the hook might have provided. While this may be correct for basic wallet operations, please verify that the wallet balance queries and other operations work properly with an unauthenticated client.

Also applies to: 22-22


🏁 Script executed:

#!/bin/bash
# Description: Check how useThirdwebClient was implemented and if it provided authentication context
# Expected: Find if useThirdwebClient included authentication or if unauthenticated client is sufficient

# Search for useThirdwebClient implementation
rg -A 10 "export.*useThirdwebClient" --type ts --type tsx

# Search for other usages of getClientThirdwebClient to see if they pass auth params
rg -A 5 -B 5 "getClientThirdwebClient.*jwt|teamId" --type ts --type tsx

Length of output: 189


🏁 Script executed:

#!/bin/bash
set -e

echo "1. Searching for any definitions or usages of useThirdwebClient..."
rg -n "useThirdwebClient" .

echo
echo "2. Locating the thirdweb-client.client.ts file..."
filepath=$(fd -1 "thirdweb-client.client.ts" || true)
if [[ -z "$filepath" ]]; then
  echo "thirdweb-client.client.ts not found via fd, trying .tsx/.ts extensions..."
  filepath=$(fd -1 "thirdweb-client.client.*" || true)
fi
echo "Found: $filepath"

echo
echo "3. Showing getClientThirdwebClient signature and default parameters..."
if [[ -n "$filepath" ]]; then
  rg -n "export function getClientThirdwebClient" -A5 -B2 "$filepath"
  rg -n "getClientThirdwebClient\(" -A3 -B1 "$filepath"
else
  echo "Cannot locate getClientThirdwebClient implementation."
fi

Length of output: 179


🏁 Script executed:

#!/bin/bash
set -e

echo "1) Find all occurrences of getClientThirdwebClient:"
rg -n "getClientThirdwebClient" --no-heading --color never || true

echo
echo "2) Locate thirdweb-client.client files (TS/JS):"
find . -type f \( -iname "thirdweb-client.client.ts*" -o -iname "thirdweb-client.client.js*" \) || true

echo
FIRST_FILE=$(find . -type f \( -iname "thirdweb-client.client.ts*" -o -iname "thirdweb-client.client.js*" \) | head -n1)
if [[ -n "$FIRST_FILE" ]]; then
  echo "Inspecting file: $FIRST_FILE"
  echo
  echo "a) getClientThirdwebClient signature:"
  rg -n "export function getClientThirdwebClient" -A5 -B2 "$FIRST_FILE" || true

  echo
  echo "b) getClientThirdwebClient implementation snippet:"
  sed -n '/export function getClientThirdwebClient/,/^}/p' "$FIRST_FILE"
else
  echo "No thirdweb-client.client file found."
fi

Length of output: 19786


Ignore authentication context concern

I searched for any useThirdwebClient hook and found none—everywhere, including in PosthogIdentifier.tsx, the code has always called getClientThirdwebClient directly with optional jwt/teamId parameters. Invoking it without arguments simply yields an unauthenticated client as designed, so there’s no loss of context or behavioral change here.

Likely an incorrect or invalid review comment.

apps/dashboard/src/components/contract-components/contract-publish-form/decoded-bytes-input/decoded-input-array-fieldset.tsx (4)

13-13: LGTM: Import addition for client prop typing.

The import of ThirdwebClient type is necessary for the new client prop added to the component interface.


18-18: LGTM: Interface correctly updated with client prop.

The addition of client: ThirdwebClient to the props interface is consistent with the broader refactor to pass the client explicitly rather than using hooks internally.


23-23: LGTM: Function signature correctly destructures client prop.

The function signature has been properly updated to include the client parameter, maintaining consistency with the interface changes.


61-65: LGTM: Client prop correctly passed to child component.

The client prop is properly passed down to the DecodedInputSet child component, ensuring the ThirdwebClient instance flows through the component hierarchy as intended by this refactor.

apps/dashboard/src/contract-ui/hooks/useContractSources.ts (1)

38-38: LGTM: Using contract's client instance is more direct.

This change correctly uses the client from the contract object itself rather than creating a separate client instance via the useThirdwebClient hook. This is more efficient and aligns with the PR's objective to remove internal hook usage in favor of explicit client passing.

apps/dashboard/src/app/(app)/(dashboard)/published-contract/components/uri-based-deploy.tsx (3)

4-4: LGTM: Import needed for client creation.

The import of getClientThirdwebClient is required for creating the authenticated client instance later in the component.


46-49: LGTM: Client creation with proper authentication context.

The client is correctly created using the authenticated JWT token and undefined teamId, which is appropriate for this deployment context.


58-60: LGTM: Props correctly updated for the refactor.

The changes properly replace the jwt prop with a boolean isLoggedIn indicator and add the client prop. This aligns with the pattern of passing client instances explicitly rather than letting components create their own clients internally.

apps/dashboard/src/app/(app)/(dashboard)/contracts/publish/[publish_uri]/page.tsx (3)

3-4: LGTM: Import updates for client creation.

The addition of getClientThirdwebClient import is necessary for creating the authenticated client instance. The reorganization of the serverThirdwebClient import is a minor improvement to import order.


75-75: LGTM: Prop change from JWT to boolean login status.

Converting from passing the JWT token directly to a boolean isLoggedIn indicator is cleaner and more semantic, as the actual client instance is now passed separately.


86-89: LGTM: Client creation and prop passing is correct.

The client is properly created using getClientThirdwebClient with the JWT token for authentication and undefined teamId, which is appropriate for this publish context. The client prop is correctly passed to the ContractPublishForm component, completing the refactor pattern of explicit client passing.

apps/dashboard/src/components/contract-components/contract-publish-form/contract-params-fieldset.tsx (1)

239-241: LGTM! Correct implementation of explicit client prop passing.

The changes properly pass the client prop to both RefInputFieldset and DecodedInputArrayFieldset components, which aligns with the broader refactoring effort to remove the useThirdwebClient hook and use explicit dependency injection instead.

apps/dashboard/src/app/(app)/(dashboard)/published-contract/[publisher]/[contract_id]/[version]/page.tsx (3)

3-3: LGTM! Proper imports for client creation and authentication.

The new imports correctly bring in the necessary functions for creating an authenticated ThirdwebClient instance.

Also applies to: 12-12


71-74: LGTM! Efficient concurrent data fetching.

Using Promise.all to fetch both the auth token and account data concurrently is a good performance optimization that reduces the overall loading time.


95-98: LGTM! Correct client instantiation with authentication context.

The client is properly created with the JWT token for authentication and teamId explicitly set to undefined, which is appropriate for this context. This follows the new pattern of explicit client creation and prop passing.

apps/dashboard/src/components/contract-components/contract-publish-form/decoded-bytes-input/decoded-input.tsx (2)

14-14: LGTM! Proper TypeScript integration and prop interface update.

The changes correctly add the ThirdwebClient import and update the component interface and signature to accept the client prop, maintaining type safety throughout.

Also applies to: 22-22, 30-30


117-117: LGTM! Correct prop propagation to child component.

The client prop is properly passed down to the RefBytesInputFieldset component, ensuring the ThirdwebClient instance is available where needed in the component tree.

apps/dashboard/src/components/smart-wallets/AccountFactories/factory-contracts.tsx (2)

18-18: LGTM! Proper TypeScript integration and interface update.

The changes correctly add the ThirdwebClient import and update the component interface and signature to include the client prop, maintaining type safety and following the established refactoring pattern.

Also applies to: 28-28, 54-54


76-76: LGTM! Correct client prop propagation to table cells.

The client prop is properly passed to both ContractNameCell and FactoryAccountCell components, ensuring they have access to the ThirdwebClient instance for their operations.

Also applies to: 94-94

apps/dashboard/src/app/(app)/components/MobileBurgerMenuButton.tsx (3)

20-20: LGTM: Clean import addition

The ThirdwebClient type import is properly added to support the new prop requirements.


31-31: LGTM: Consistent client prop addition

The client prop is properly added to both union type variants, ensuring the component can access the ThirdwebClient instance regardless of login state.

Also applies to: 35-35


40-44: LGTM: Correct useEns hook update

The useEns hook call has been properly updated to match the new signature shown in the relevant code snippets. The conditional logic correctly provides the accountAddress only when the user is logged in.

apps/dashboard/src/components/contract-components/contract-publish-form/ref-contract-input/ref-input-fieldset.tsx (2)

6-6: LGTM: Required type import

The ThirdwebClient type import is properly added to support the new prop.


11-11: LGTM: Clean prop drilling implementation

The client prop is properly added to the interface, component parameters, and passed down to child RefContractInput components. This follows the consistent pattern of explicit client dependency injection.

Also applies to: 16-16, 35-35

apps/dashboard/src/components/contract-components/contract-publish-form/decoded-bytes-input/ref-bytes-input-fieldset.tsx (2)

5-5: LGTM: Consistent type import

The ThirdwebClient type import follows the same pattern as other files in this refactor.


12-12: LGTM: Consistent prop drilling pattern

The client prop is properly added to the interface, component parameters, and passed down to child RefBytesContractInput components, maintaining consistency with the overall refactor approach.

Also applies to: 19-19, 39-39

apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/connect/in-app-wallets/settings/page.tsx (4)

4-4: LGTM: Proper imports for client creation and authentication

The new imports support the authentication flow and client creation functionality required for this refactor.

Also applies to: 7-8


16-21: LGTM: Efficient concurrent data fetching

Adding authToken to the Promise.all maintains the efficient concurrent fetching pattern while adding the necessary authentication data.


35-38: LGTM: Proper client creation

The getClientThirdwebClient call correctly uses the authenticated token and team ID to create the client instance.


47-47: LGTM: Client prop propagation

The client prop is properly passed to the InAppWalletSettingsPage component, completing the dependency injection pattern.

apps/dashboard/src/components/explore/publisher/index.tsx (1)

6-6: LGTM: Clean refactor following the established pattern.

The changes properly externalize the ThirdwebClient dependency by:

  • Adding the required type import
  • Updating the interface to include the client prop
  • Accepting the client parameter in the component
  • Correctly passing it down to AccountProvider

This follows the broader refactoring goal of removing internal useThirdwebClient hook usage in favor of explicit prop passing.

Also applies to: 18-18, 23-23, 26-26

apps/dashboard/src/components/contract-pages/table/table-columns/cells/media-cell.tsx (1)

1-1: LGTM: Consistent refactor pattern applied correctly.

The component follows the same clean refactoring pattern:

  • Properly imports ThirdwebClient type
  • Updates the interface to require the client prop
  • Passes the client down to NFTMediaWithEmptyState

This maintains existing functionality while aligning with the codebase-wide client management improvements.

Also applies to: 9-9, 12-12, 17-17

apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/tokens/components/airdrop-upload.tsx (1)

10-10: LGTM: Proper client integration with the validation hook.

The refactor correctly follows the established pattern and properly integrates with useCsvUpload. Based on the relevant code snippets, the hook requires the client parameter for address validation via checkIsAddress, making this change both necessary and correct.

The implementation maintains all existing functionality while improving client management consistency.

Also applies to: 22-22, 37-37, 48-48

apps/dashboard/src/app/(app)/(dashboard)/published-contract/[publisher]/[contract_id]/page.tsx (3)

3-3: LGTM: Proper imports for client creation and authentication.

The imports are correctly added for the client factory function and authentication token retrieval.

Also applies to: 8-8


41-44: LGTM: Good performance optimization with concurrent fetching.

Using Promise.all to fetch both the account data and auth token concurrently is a good performance optimization that reduces the overall loading time.


65-68: LGTM: Proper authenticated client creation and passing.

The client is correctly created with the JWT token for authentication and passed to the PublishedContract component. The getClientThirdwebClient function handles undefined JWT tokens gracefully, so this implementation is robust.

This follows the established pattern of externalizing client creation and passing it down as a prop instead of components using useThirdwebClient internally.

apps/dashboard/src/tw-components/nft-media.tsx (1)

5-5: LGTM: Clean refactor to explicit client passing

The changes correctly implement the architectural shift from internal useThirdwebClient usage to explicit client prop injection. The type import, props interface update, and MediaRenderer prop passing are all implemented correctly.

Also applies to: 19-19, 53-53

apps/dashboard/src/components/contract-components/contract-publish-form/ref-contract-impl-input/ref-input-impl.tsx (3)

16-16: LGTM: Correct component interface updates

The ThirdwebClient type import and prop interface changes are correctly implemented to support explicit client dependency injection.

Also applies to: 24-24, 31-31


36-41: LGTM: Hook call updated to new signature

The usePublishedContractsQuery call is correctly updated to pass an object with both client and address properties, indicating the hook signature was changed to require explicit client passing.


50-50: LGTM: useAllVersions updated with client parameter

The useAllVersions hook call is correctly updated to include the client parameter, consistent with the architectural refactor.

apps/dashboard/src/components/contract-components/contract-publish-form/custom-factory.tsx (1)

32-32: LGTM: Hook call updated to new signature

The useCustomFactoryAbi hook call is correctly updated to include client as the first parameter, aligning with the refactored hook signature that requires explicit client passing.

apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/shared-layout.tsx (2)

3-3: LGTM: Proper import and function signature update

The import of getClientThirdwebClient and addition of the optional authToken parameter to the function signature are correctly implemented to support authenticated client creation.

Also applies to: 31-31


48-57: LGTM: Authenticated client creation and passing

The client creation using getClientThirdwebClient with JWT and team context is correctly implemented. The client is properly passed to ConfigureCustomChain only when chain info is not found, maintaining the existing conditional logic while adding authentication support.

apps/dashboard/src/components/contract-components/contract-publish-form/decoded-bytes-input/decoded-input-set.tsx (1)

12-12: LGTM! Clean implementation of client prop injection.

The changes correctly implement the refactor pattern by:

  • Adding proper TypeScript typing for the ThirdwebClient
  • Including the client prop in the interface
  • Properly destructuring and passing the client to child components

This follows the established pattern for removing useThirdwebClient hook dependency.

Also applies to: 18-18, 24-24, 68-68

apps/dashboard/src/app/(app)/team/components/TeamHeader/team-header.tsx (2)

22-25: Well-designed client instantiation for unauthenticated scenarios.

The creation of a base client without teamId for logged-out cases is appropriate and ensures that HeaderLoggedOut receives the necessary client instance for any thirdweb operations it may need to perform.

Also applies to: 28-28, 46-46


49-52: Good separation of concerns with distinct client instances.

The lastUsedTeamClient naming clearly distinguishes this team-specific client from the base client used for unauthenticated scenarios. This approach properly handles different authentication contexts.

Also applies to: 56-56

apps/dashboard/src/components/contract-components/tables/cells.tsx (2)

11-11: Correct implementation of client prop in ContractNameCell.

The addition of the client prop and its usage in the getContract call properly replaces the previous useThirdwebClient hook dependency. The TypeScript typing is correct.

Also applies to: 22-22, 28-28


62-62: Consistent implementation in ContractTypeCell.

The changes mirror the pattern used in ContractNameCell, maintaining consistency across both components. The client prop is properly typed and used in the contract instantiation.

Also applies to: 66-66

apps/dashboard/src/hooks/useCsvUpload.ts (1)

85-85: Clean refactor of client dependency injection.

The addition of the client prop to the Props interface and its usage in the checkIsAddress call correctly removes the internal useThirdwebClient hook dependency while maintaining the same functionality. The parameter naming (thirdwebClient: props.client) is consistent with the existing function signature.

Also applies to: 143-145

apps/dashboard/src/components/contract-components/published-contract/index.tsx (5)

48-48: LGTM: Proper client prop integration

The addition of the client prop to the interface and its usage in the component follows the expected pattern for explicit dependency injection.

Also applies to: 54-54


78-78: LGTM: Consistent client propagation to utility function

The client is correctly passed to fetchSourceFilesFromMetadata, which aligns with the function's updated signature that now accepts a client parameter.


160-163: LGTM: Client prop properly passed to child component

The PublisherHeader component now receives the client prop, ensuring consistent client context throughout the component hierarchy.


197-200: LGTM: Client used correctly in IPFS URL replacement

The client is properly used in the replaceIpfsUrl function call for audit report link generation.


269-313: LGTM: Function signature and implementation updated consistently

The fetchSourceFilesFromMetadata function correctly accepts the client parameter and uses it appropriately in the download function call. The async metadata fetching logic remains intact.

apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/assets/create/distribution/token-airdrop.tsx (3)

39-39: LGTM: Proper client prop addition and typing

The ThirdwebClient import and prop addition to TokenAirdropSection follows the established pattern for explicit client dependency injection.

Also applies to: 51-51


163-163: LGTM: Client prop correctly propagated to child component

The client is properly passed down to the AirdropUpload component, maintaining the client context through the component hierarchy.


193-193: LGTM: Consistent client integration in AirdropUpload

The client prop is correctly added to the AirdropUploadProps interface, accepted in the component parameters, and properly passed to the useCsvUpload hook. This aligns with the hook's expected interface as shown in the relevant code snippets.

Also applies to: 209-209, 219-219

apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/overview/components/published-by-ui.tsx (4)

5-5: LGTM: Simplified imports

The removal of ThirdwebClient import is appropriate since the function now uses contract.client instead of accepting a separate client parameter.


24-24: LGTM: Cleaner function interface

Removing the client parameter simplifies the function interface while maintaining functionality by using contract.client internally.


26-28: LGTM: Simplified function call

The fetchPublishedContractsFromDeploy call is cleaner without the explicit client parameter, relying on the contract object to provide the necessary client context.


55-58: LGTM: Consistent use of contract.client

Using contract.client instead of a separate client parameter is a good design choice that leverages the fact that the contract object already contains the client instance.

apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/_components/claim-conditions/snapshot-upload.tsx (3)

17-17: LGTM: Proper client prop integration

The ThirdwebClient import and addition to the SnapshotUploadProps interface correctly follows the pattern for explicit client dependency injection.

Also applies to: 33-33


53-53: LGTM: Client parameter correctly added to component

The client parameter is properly integrated into the SnapshotViewerSheetContent component signature.


64-68: LGTM: Client correctly passed to useCsvUpload hook

The client is properly passed to the useCsvUpload hook along with other parameters. This aligns with the hook's expected interface as confirmed by the relevant code snippets.

apps/dashboard/src/components/contract-components/contract-publish-form/decoded-bytes-input/ref-bytes-input.tsx (3)

16-16: LGTM! Client prop addition is correctly implemented.

The addition of the ThirdwebClient type import and prop to the component interface and signature follows the expected refactoring pattern consistently.

Also applies to: 26-26, 36-36


40-45: LGTM! Hook call updated correctly for explicit client passing.

The usePublishedContractsQuery call has been properly updated from passing just the address to passing an object containing both client and address, which aligns with the refactoring to remove the useThirdwebClient hook.


47-55: LGTM! Client parameter correctly added to useAllVersions hook.

The useAllVersions hook call has been properly updated to accept the client parameter as the third argument, maintaining the existing functionality while supporting explicit client dependency injection.

apps/dashboard/src/app/(app)/team/components/HeaderLoggedOut/HeaderLoggedOut.tsx (3)

8-8: LGTM! ThirdwebClient type import correctly added.

The import statement for the ThirdwebClient type is properly added to support the new client prop throughout the component hierarchy.


15-15: LGTM! Client prop correctly added to all component interfaces.

All three components (HeaderLoggedOutDesktopUI, HeaderLoggedOutMobileUI, and HeaderLoggedOut) have been consistently updated to accept the client prop, maintaining proper TypeScript typing.

Also applies to: 55-55, 84-84


78-78: LGTM! Client prop properly passed through component hierarchy.

The client prop is correctly passed down from the parent HeaderLoggedOut component to both desktop and mobile UI components, and further to the MobileBurgerMenuButton, ensuring consistent client availability throughout the component tree.

Also applies to: 87-91

apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/_components/NFTCards.tsx (2)

4-4: LGTM! Client prop addition is correctly implemented.

The ThirdwebClient type import and client prop have been properly added to the component interface and signature, following the established refactoring pattern.

Also applies to: 35-35, 44-44


78-78: LGTM! Client prop correctly passed to NFTMediaWithEmptyState.

The client prop is properly forwarded to the NFTMediaWithEmptyState component, ensuring it has access to the ThirdwebClient instance for its operations.

apps/dashboard/src/components/selects/NetworkSelectorButton.tsx (2)

12-12: LGTM! Client prop addition is correctly implemented.

The ThirdwebClient type import and client prop have been properly added to the component interface and signature, maintaining consistency with the refactoring pattern across the codebase.

Also applies to: 33-33, 42-42


177-177: LGTM! Client prop correctly distributed to all dependent components.

The client prop is properly passed to all components and services that require it:

  • CustomChainRenderer receives the client for chain operations
  • The network switcher modal options include the client
  • ChainIconClient receives the client for icon rendering
  • LazyConfigureNetworkModal receives the client for network configuration

This ensures consistent client usage throughout the network selection functionality.

Also applies to: 200-200, 206-206, 218-218

apps/dashboard/src/components/configure-networks/ConfigureNetworkForm.tsx (4)

12-12: LGTM: Proper ThirdwebClient import added.

The import is correctly added to support the new client prop requirement.


49-49: LGTM: Client prop properly added to component interface and destructured.

The client prop is correctly typed as ThirdwebClient and properly destructured in the component parameters, following the established pattern for this refactor.

Also applies to: 59-59


73-77: LGTM: Client properly passed to getDashboardChainRpc.

The client parameter is correctly passed to the getDashboardChainRpc function call, maintaining consistency with the refactor to explicit client passing.


379-383: LGTM: Client properly passed to child components.

Both ChainIconClient and IconUpload components correctly receive the client prop, ensuring consistent client usage throughout the component hierarchy.

Also applies to: 384-390

apps/dashboard/src/components/smart-wallets/AccountFactories/account-cell.tsx (3)

5-5: LGTM: Import statement properly updated.

The import correctly adds ThirdwebClient type and removes the no-longer-needed useThirdwebClient hook, aligning with the refactor objectives.


10-14: LGTM: Hook signature updated to accept explicit client parameter.

The useAccountCount hook correctly accepts the ThirdwebClient parameter and uses it in the getContract call, following the established pattern of explicit client dependency injection.

Also applies to: 19-19


33-33: LGTM: Component properly updated to accept and pass client prop.

The FactoryAccountCell component correctly accepts the client prop and passes it to the useAccountCount hook, maintaining consistency in the component hierarchy.

Also applies to: 38-38

apps/dashboard/src/components/contract-components/fetchPublishedContractsFromDeploy.ts (3)

2-2: LGTM: Import simplified by removing unused ThirdwebClient type.

Since the function no longer takes a separate client parameter and uses contract.client instead, the ThirdwebClient import is correctly removed.


23-23: LGTM: Function signature simplified.

Removing the explicit client parameter simplifies the function interface while maintaining functionality by using contract.client. This is a good refactor that reduces redundancy.


31-31: LGTM: Consistent usage of contract.client throughout.

All references to the client are consistently updated to use contract.client, ensuring the refactor is complete and maintaining the same functionality with a cleaner interface.

Also applies to: 41-41, 52-52, 62-62

apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/connect/account-abstraction/factories/page.tsx (3)

7-7: LGTM: Proper imports added for client creation and typing.

The imports for getClientThirdwebClient and ThirdwebClient are correctly added to support the new client creation and prop typing requirements.

Also applies to: 15-15


48-51: LGTM: Client properly created with authentication parameters.

The client is correctly created using getClientThirdwebClient with the JWT token and team ID, ensuring proper authentication for the client instance.


62-62: LGTM: Client properly threaded through component hierarchy.

The client is correctly passed as props through the component hierarchy (YourFactoriesSectionAsyncYourFactoriesFactoryContracts), ensuring consistent client usage throughout the component tree.

Also applies to: 74-74, 115-115, 128-128, 164-164

apps/dashboard/src/components/contract-components/contract-publish-form/landing-fieldset.tsx (2)

21-21: LGTM! Clean refactor to explicit client passing.

The component interface has been properly updated to include the client prop of type ThirdwebClient, replacing the internal useThirdwebClient hook usage. This improves dependency injection and makes client management more explicit.

Also applies to: 38-38, 44-44


109-109: Client usage is consistent and correct.

The client prop is properly passed to both replaceIpfsUrl and SolidityInput component, maintaining the same functionality while using the explicitly passed client instance.

Also applies to: 262-262

apps/dashboard/src/components/contract-components/contract-publish-form/ref-contract-input/ref-input.tsx (2)

16-16: Proper interface update for explicit client passing.

The component interface and parameters have been correctly updated to include the client prop of type ThirdwebClient, following the consistent refactor pattern.

Also applies to: 24-24, 32-32


36-41: Hook usage correctly updated to new signatures.

Both usePublishedContractsQuery and useAllVersions hooks are now called with the explicit client parameter, matching their updated signatures. The object parameter style for usePublishedContractsQuery is consistent with the hook definition shown in the relevant code snippets.

Also applies to: 43-51

apps/dashboard/src/components/contract-components/publisher/publisher-header.tsx (2)

8-8: Interface correctly updated for explicit client management.

The component interface and parameters have been properly updated to include the client prop, replacing internal client acquisition with explicit dependency injection.

Also applies to: 23-23, 25-28


29-32: Hook and component usage updated correctly.

The useEns hook is now called with the correct object parameter containing client and addressOrEnsName, and the AccountProvider component properly receives the client prop. This matches the expected hook signature from the relevant code snippets.

Also applies to: 42-42

apps/dashboard/src/components/contract-components/contract-deploy-form/custom-contract.tsx (4)

36-36: Props interface properly refactored for cleaner API.

The component props have been correctly updated from jwt: string to isLoggedIn: boolean and added client: ThirdwebClient. This provides a cleaner API where authentication state is explicitly boolean and the client is passed explicitly.

Also applies to: 84-84, 87-87, 158-158, 160-160


228-231: Hook and function calls correctly updated with client parameter.

All the hook calls (useCustomFactoryAbi) and async function calls (upload, deployMarketplaceContract, deployContractfromDeployMetadata, getRequiredTransactions, getContract) have been properly updated to include the client parameter, maintaining functionality while using explicit client passing.

Also applies to: 501-503, 524-524, 573-573, 603-603, 667-667


629-629: Authentication logic properly updated.

The form submission condition has been correctly updated from checking jwt presence to checking the isLoggedIn boolean, which is more explicit and aligns with the cleaner props interface.


463-463: Child components consistently updated with client prop.

All child components (Param, PrimarySaleFieldset, RoyaltyFieldset, PlatformFeeFieldset, SplitFieldset, TrustedForwardersFieldset, ModularContractDefaultModulesFieldset, AddToProjectCardUI, NetworkSelectorButton, SolidityInput) are properly receiving the client prop, ensuring consistent client propagation throughout the component tree.

Also applies to: 738-738, 757-757, 791-791, 800-800, 804-804, 807-807, 830-830, 858-858, 901-901, 911-911, 935-935, 957-957, 1028-1028

apps/dashboard/src/components/contract-components/contract-publish-form/index.tsx (4)

31-36: LGTM: Clean prop signature update

The component signature has been properly updated to receive the client and isLoggedIn props directly. This follows the intended refactoring pattern of removing the useThirdwebClient hook dependency.


133-136: LGTM: Proper client prop usage in hook

The useEns hook call has been correctly updated to use the client prop instead of relying on the internal useThirdwebClient hook.


266-266: LGTM: Consistent client usage in contract operations

The getContractPublisher call correctly uses props.client, maintaining consistency with the refactoring pattern.


334-334: LGTM: Proper client prop propagation to child components

All child components (LandingFieldset, ContractParamsFieldset, ImplementationParamsFieldset, FactoryFieldset, NetworksFieldset, and CustomConnectWallet) are correctly receiving the client prop. This ensures the client instance flows through the component hierarchy consistently.

Also applies to: 341-341, 348-348, 357-357, 364-364, 380-381

apps/dashboard/src/components/embedded-wallets/Configure/index.tsx (3)

55-55: LGTM: Type definition updated correctly

The InAppWalletSettingsPageProps type has been properly extended to include the client: ThirdwebClient prop.


161-161: LGTM: Consistent client prop propagation

The client prop is correctly threaded through the component hierarchy: InAppWalletSettingsPageUIInAppWalletSettingsUIBrandingFieldsetAppImageFormControl. This maintains a clean dependency injection pattern.

Also applies to: 174-174, 281-281, 333-333


426-426: LGTM: Proper client usage in file operations

The AppImageFormControl component correctly uses the client prop for:

  1. URL resolution with resolveSchemeWithErrorHandler
  2. File upload operations with the upload function

This ensures IPFS URLs are properly resolved and file uploads work with the authenticated client context.

Also applies to: 430-430, 437-437

apps/dashboard/src/core-ui/batch-upload/batch-table.tsx (4)

33-37: LGTM: Component signatures updated correctly

Both FileImage and FileVideo components have been properly updated to accept the client: ThirdwebClient prop and use it for IPFS URL resolution with replaceIpfsUrl.

Also applies to: 46-52


64-64: LGTM: Props interface and component signature updated

The BatchTableProps interface and component signature have been correctly updated to include the client prop, maintaining type safety throughout the component.

Also applies to: 71-71


93-93: LGTM: Client prop passed to media components

The client prop is correctly passed to both FileImage and FileVideo components within the table cells, ensuring IPFS URLs are properly resolved for image and video content.

Also applies to: 110-110


142-142: LGTM: Dependency array properly updated

The useMemo dependency array correctly includes the client prop. This ensures the columns are re-computed when the client instance changes, which is important for proper IPFS URL resolution.

apps/dashboard/src/components/contract-components/hooks.ts (5)

18-22: LGTM: Hook signature updated correctly

The useAllVersions hook has been properly updated to accept client: ThirdwebClient as a parameter and uses it in the fetchPublishedContractVersions call.


108-118: LGTM: Clean parameter object pattern

The usePublishedContractsQuery hook has been updated to use a parameter object pattern with destructuring, which is more maintainable and allows for easier extension. The client is correctly passed to fetchPublishedContracts.


179-185: LGTM: Consistent parameter pattern with useEns

The useEns hook follows the same parameter object pattern and correctly passes the client to the ensQuery function. This maintains consistency with other updated hooks.


191-196: LGTM: Client as first parameter

The useCustomFactoryAbi hook correctly accepts the client as the first parameter and uses it when creating the contract instance with getContract.


108-118:

✅ Verification successful

Note: These are breaking changes

The hook signature changes in usePublishedContractsQuery and useEns are breaking changes that will require updates in all consuming components. This appears intentional as part of the broader refactoring to remove useThirdwebClient.

Let's verify that all consumers of these hooks have been updated:

Also applies to: 179-185


🏁 Script executed:

#!/bin/bash
# Description: Check for any remaining usage of the old hook signatures that might have been missed

# Search for usePublishedContractsQuery calls that don't pass client parameter
echo "=== Checking usePublishedContractsQuery usage ==="
rg "usePublishedContractsQuery\(" -A 3 -B 1

echo -e "\n=== Checking useEns usage ==="
rg "useEns\(" -A 3 -B 1

echo -e "\n=== Checking useAllVersions usage ==="
rg "useAllVersions\(" -A 3 -B 1

echo -e "\n=== Checking useCustomFactoryAbi usage ==="
rg "useCustomFactoryAbi\(" -A 3 -B 1

Length of output: 11968


Confirmed: All breaking hook signature updates applied

I’ve verified that every invocation of the following hooks now matches the updated signatures—including the required client parameter—and no stale usages remain:

  • usePublishedContractsQuery in all contract-publish-form components and ModuleForm.tsx
  • useEns across MobileBurgerMenuButton.tsx, account-button.client.tsx, contract-publish-form, publisher header, and address-input.tsx
  • useAllVersions in decoded-bytes-input, ref-input-impl, ref-input, and ModuleForm.tsx
  • useCustomFactoryAbi in custom-factory and custom-contract forms

No further updates are needed.

Copy link
Contributor

graphite-app bot commented May 30, 2025

Merge activity

@graphite-app graphite-app bot force-pushed the 05-30-dashboard_reduce_usethirdwebclient_hook_usage_4 branch from 5fc9198 to 1c11f84 Compare May 30, 2025 18:36
graphite-app bot pushed a commit that referenced this pull request May 30, 2025
<!--

## title your PR with this format: "[SDK/Dashboard/Portal] Feature/Fix: Concise title for the changes"

If you did not copy the branch name from Linear, paste the issue tag here (format is TEAM-0000):

## Notes for the reviewer

Anything important to call out? Be sure to also clarify these in your comments.

## How to test

Unit tests, playground, etc.

-->

<!-- start pr-codex -->

---

## PR-Codex overview
This PR focuses on updating various components to accept a `client` prop of type `ThirdwebClient`, enhancing the integration and functionality of the client throughout the application.

### Detailed summary
- Added `client` prop to multiple components for better client integration.
- Updated function signatures to accept `client`.
- Modified existing usages to pass the `client` prop.
- Removed redundant client retrievals from components.

> The following files were skipped due to too many changes: `apps/dashboard/src/components/contract-components/hooks.ts`, `apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/connect/account-abstraction/factories/page.tsx`, `apps/dashboard/src/components/embedded-wallets/Configure/index.tsx`, `apps/dashboard/src/components/contract-components/contract-publish-form/index.tsx`, `apps/dashboard/src/components/contract-components/contract-deploy-form/custom-contract.tsx`

> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`

<!-- end pr-codex -->

<!-- This is an auto-generated comment: release notes by coderabbit.ai -->

## Summary by CodeRabbit

- **New Features**
  - Many components now accept a client instance as a prop, enabling more explicit and flexible client management throughout the dashboard.
- **Refactor**
  - Shifted from internal client initialization to explicit client prop injection across the app, affecting forms, tables, media components, contract publishing, and wallet settings.
  - Updated hooks and utility functions to require a client parameter instead of relying on internal context.
- **Chores**
  - Removed unused files and internal hooks related to client management.
- **Bug Fixes**
  - Improved consistency and reliability when handling authentication and client context in user flows.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
@graphite-app graphite-app bot force-pushed the 05-30-dashboard_remove_usethirdwebclient_hook branch from e171fb9 to a46395b Compare May 30, 2025 18:37
@vercel vercel bot temporarily deployed to Preview – thirdweb_playground May 30, 2025 18:37 Inactive
@vercel vercel bot temporarily deployed to Preview – login May 30, 2025 18:37 Inactive
@vercel vercel bot temporarily deployed to Preview – wallet-ui May 30, 2025 18:37 Inactive
@vercel vercel bot temporarily deployed to Preview – docs-v2 May 30, 2025 18:37 Inactive
Base automatically changed from 05-30-dashboard_reduce_usethirdwebclient_hook_usage_4 to main May 30, 2025 18:47
<!--

## title your PR with this format: "[SDK/Dashboard/Portal] Feature/Fix: Concise title for the changes"

If you did not copy the branch name from Linear, paste the issue tag here (format is TEAM-0000):

## Notes for the reviewer

Anything important to call out? Be sure to also clarify these in your comments.

## How to test

Unit tests, playground, etc.

-->

<!-- start pr-codex -->

---

## PR-Codex overview
This PR focuses on integrating the `ThirdwebClient` into various components and functions across the application, enhancing the client functionality for better interaction with smart contracts and improving the overall architecture.

### Detailed summary
- Added `client` prop to multiple components for better contract interactions.
- Updated functions to utilize the `contract.client` instead of a generic client.
- Removed redundant imports of `useThirdwebClient`.
- Enhanced several UI components to accept and use the `client` prop.
- Modified API calls to pass the `client` where necessary for fetching data.
- Improved handling of ENS queries by passing the `client` directly.

> The following files were skipped due to too many changes: `apps/dashboard/src/components/contract-components/hooks.ts`, `apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/connect/account-abstraction/factories/page.tsx`, `apps/dashboard/src/components/embedded-wallets/Configure/index.tsx`, `apps/dashboard/src/components/contract-components/contract-publish-form/index.tsx`, `apps/dashboard/src/components/contract-components/contract-deploy-form/custom-contract.tsx`

> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`

<!-- end pr-codex -->

<!-- This is an auto-generated comment: release notes by coderabbit.ai -->

## Summary by CodeRabbit

- **New Features**
  - Many components now accept a client instance as a prop, enabling more explicit and flexible client management throughout the dashboard.
- **Refactor**
  - Shifted from internal client initialization to explicit client prop injection across the app, affecting forms, tables, media components, contract publishing, and wallet settings.
  - Updated hooks and utility functions to require a client parameter instead of relying on internal context.
- **Chores**
  - Removed unused files and internal hooks related to client management.
- **Bug Fixes**
  - Improved consistency and reliability when handling authentication and client context in user flows.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
@graphite-app graphite-app bot force-pushed the 05-30-dashboard_remove_usethirdwebclient_hook branch from a46395b to 6ae54dd Compare May 30, 2025 18:51
@vercel vercel bot temporarily deployed to Preview – docs-v2 May 30, 2025 18:51 Inactive
@vercel vercel bot temporarily deployed to Preview – login May 30, 2025 18:51 Inactive
@vercel vercel bot temporarily deployed to Preview – thirdweb_playground May 30, 2025 18:51 Inactive
@vercel vercel bot temporarily deployed to Preview – wallet-ui May 30, 2025 18:51 Inactive
@graphite-app graphite-app bot merged commit 6ae54dd into main May 30, 2025
24 checks passed
@graphite-app graphite-app bot deleted the 05-30-dashboard_remove_usethirdwebclient_hook branch May 30, 2025 19:00
@vercel vercel bot temporarily deployed to Production – docs-v2 May 30, 2025 19:00 Inactive
@vercel vercel bot temporarily deployed to Production – wallet-ui May 30, 2025 19:00 Inactive
@vercel vercel bot temporarily deployed to Production – thirdweb_playground May 30, 2025 19:00 Inactive
@vercel vercel bot temporarily deployed to Production – login May 30, 2025 19:00 Inactive
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Dashboard Involves changes to the Dashboard.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants