-
Notifications
You must be signed in to change notification settings - Fork 618
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
Dashboard: Remove useThirdwebClient hook #7228
Conversation
|
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
WalkthroughThis change refactors the codebase to remove all internal usage of the Changes
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
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}
sequenceDiagram
participant Parent
participant Child
participant NFTMediaWithEmptyState
Parent->>Child: Pass client={ThirdwebClient}
Child->>NFTMediaWithEmptyState: Pass client={ThirdwebClient}
NFTMediaWithEmptyState->>MediaRenderer: Render with client={ThirdwebClient}
Possibly related PRs
Suggested reviewers
Warning Review ran into problems🔥 ProblemsErrors were encountered while retrieving linked issues. Errors (1)
✨ Finishing Touches
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed 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)
Other keywords and placeholders
CodeRabbit Configuration File (
|
How to use the Graphite Merge QueueAdd either label to this PR to merge it via the merge queue:
You must have a Graphite account in order to use the merge queue. Sign up using this link. An organization admin has enabled the Graphite Merge Queue in this repository. Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue. This stack of pull requests is managed by Graphite. Learn more about stacking. |
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
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
🚀 New features to boost your workflow:
|
size-limit report 📦
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
🧹 Nitpick comments (2)
apps/dashboard/src/contract-ui/components/solidity-inputs/index.tsx (1)
22-22: Remove redundant client prop declaration.The
clientprop is already inherited fromSolidityInputPropssinceSolidityInputWithTypePropsextends 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 changeThe 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
📒 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
clientprop toNFTMediaWithEmptyState, following the systematic refactor to remove internaluseThirdwebClienthook 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 theAirdropUploadcomponent aligns perfectly with the systematic refactor to eliminate internaluseThirdwebClienthook 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 toSnapshotViewerSheet, 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}toNFTMediaWithEmptyStateis 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 internalMediaRenderer, 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
clientprop toMobileBurgerMenuButton, 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.clienttoNFTMediaWithEmptyState, 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.clienttoNFTMediaWithEmptyState, 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
clientprop toNFTMediaWithEmptyState, aligning with the broader refactor to removeuseThirdwebClienthook usage and pass theThirdwebClientinstance 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
clientfromcontract.clientto theAirdropUploadcomponent, maintaining consistency with the broader refactor to eliminate internaluseThirdwebClienthook 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
clientprop toNFTCardsusingcontract.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
clientprop from the parent component toTokenAirdropSection. Based on the relevant code snippet showingTokenAirdropSection's interface, thisclientprop 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
getClientThirdwebClientand passing the client instance to theContractPublishercomponent. This replaces the internaluseThirdwebClienthook 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
clientprop fromBatchLazyMintto theBatchTablecomponent, 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
ThirdwebClienttype import- Adding
clientas a required prop to the component interface- Passing the client prop down to the
ConfigureNetworkscomponentThis maintains consistency with the broader refactoring effort to remove internal
useThirdwebClienthook 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
clientprop to theHeaderLoggedOutcomponent usingstorybookThirdwebClient. 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
storybookThirdwebClientis 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 theuseThirdwebClienthook 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
authTokenprop is properly added to enableSharedContractLayoutto 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
useEnshook call is properly updated to pass an object withaddressOrEnsNameandclientproperties, matching the new hook signature that requires explicit client passing instead of usinguseThirdwebClientinternally.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
clientprop toSolidityInputPropsinterface aligns with the refactoring objectives to passThirdwebClientexplicitly.
56-75:✅ Verification successful
Verify client prop is passed to child components.
The component receives a
clientprop but doesn't explicitly pass it to the childSolidityRawInputcomponent. 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 tsxLength of output: 265
To ensure we didn’t miss any
client-related props in the child components, let’s search all the.tsxfiles underapps/dashboard/src/contract-ui/components/solidity-inputsfor any declaration or use ofclient. We’ll also look for anyPropsinterfaces to see ifclientis 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" -A5Length of output: 2788
Let’s inspect all the rendering branches in
index.tsxto confirm every child receives...inputProps(and thusclient):
🏁 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
clientvia{...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.tsxLength of output: 1638
No changes needed—
clientis forwarded via...inputProps.All child components that require the
clientprop (e.g.SolidityAddressInputandSolidityStringInput) destructure and use it, and every branch inindex.tsxspreads...inputProps(which includesclient). 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 theMediaCellcomponent aligns perfectly with the refactoring objectives. This ensures the component receives theThirdwebClientinstance 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
usePublishedContractsQuerycall has been correctly updated to pass an object withclientandaddressproperties, matching the hook's new signature shown in the relevant code snippets.
89-93: LGTM! Client parameter added to useAllVersions.The
useAllVersionshook call has been correctly updated to include theclientparameter, aligning with the refactoring pattern to pass theThirdwebClientinstance explicitly.apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/layout.tsx (3)
2-2: LGTM! Authentication import added.The import of
getAuthTokenfunction supports the authentication enhancement in this component.
15-15: LGTM! Concurrent fetching improves performance.Using
Promise.allto concurrently fetchparamsandauthTokenis an excellent optimization that reduces the overall loading time.
21-21: LGTM! Authentication token passed to layout.Passing the
authTokentoSharedContractLayoutenables proper authentication context propagation, which supports the creation of authenticatedThirdwebClientinstances downstream.apps/dashboard/src/components/configure-networks/ConfigureNetworkModal.tsx (1)
2-2: LGTM: Clean client prop threading implementationThe changes correctly implement the client prop pattern:
- Proper import of
ThirdwebClienttype- Extension of props interface to include required
clientprop- Correct propagation to child
ConfigureNetworkscomponentThis aligns with the PR objective of removing internal
useThirdwebClientusage.Also applies to: 14-14, 35-35
apps/dashboard/src/app/(app)/account/components/AccountHeaderUI.tsx (1)
134-134: LGTM: Correct client prop propagationThe change properly passes the
clientprop down toMobileBurgerMenuButton, 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 forwardingThe change correctly forwards the
clientprop to theRefInputImplFieldsetcomponent, 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 cellsThe changes properly pass the
clientprop to bothContractNameCellandContractTypeCellcomponents, 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
clientprop and passes it to theuseEnshook using the expected object structure. This change aligns with the refactoring objective to remove internaluseThirdwebClientusage.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
RouteDiscoverycomponent 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
clientprop and passes it down to eachRefContractImplInputchild 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
clientprop and passes it toConfigureNetworkFormin 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
ThirdwebClientinstance from the contract to theMediaCellcomponent, which aligns with the broader refactor to remove internaluseThirdwebClienthook 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
clientprop- Passes the client down to
NetworkSelectorButtoncomponentThis 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.clientdirectly instead of callinguseThirdwebClient()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-levelgetClientThirdwebClient()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 tsxLength 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." fiLength 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." fiLength of output: 19786
Ignore authentication context concern
I searched for any
useThirdwebClienthook and found none—everywhere, including in PosthogIdentifier.tsx, the code has always calledgetClientThirdwebClientdirectly with optionaljwt/teamIdparameters. 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
ThirdwebClienttype is necessary for the newclientprop added to the component interface.
18-18: LGTM: Interface correctly updated with client prop.The addition of
client: ThirdwebClientto 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
clientparameter, maintaining consistency with the interface changes.
61-65: LGTM: Client prop correctly passed to child component.The
clientprop is properly passed down to theDecodedInputSetchild 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
useThirdwebClienthook. 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
getClientThirdwebClientis 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
jwtprop with a booleanisLoggedInindicator and add theclientprop. 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
getClientThirdwebClientimport is necessary for creating the authenticated client instance. The reorganization of theserverThirdwebClientimport 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
isLoggedInindicator 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
getClientThirdwebClientwith the JWT token for authentication andundefinedteamId, which is appropriate for this publish context. The client prop is correctly passed to theContractPublishFormcomponent, 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
clientprop to bothRefInputFieldsetandDecodedInputArrayFieldsetcomponents, which aligns with the broader refactoring effort to remove theuseThirdwebClienthook 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.allto 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
teamIdexplicitly set toundefined, 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
clientprop, maintaining type safety throughout.Also applies to: 22-22, 30-30
117-117: LGTM! Correct prop propagation to child component.The
clientprop is properly passed down to theRefBytesInputFieldsetcomponent, 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
clientprop, 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
clientprop is properly passed to bothContractNameCellandFactoryAccountCellcomponents, 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 additionThe
ThirdwebClienttype import is properly added to support the new prop requirements.
31-31: LGTM: Consistent client prop additionThe
clientprop is properly added to both union type variants, ensuring the component can access theThirdwebClientinstance regardless of login state.Also applies to: 35-35
40-44: LGTM: Correct useEns hook updateThe
useEnshook call has been properly updated to match the new signature shown in the relevant code snippets. The conditional logic correctly provides theaccountAddressonly 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 importThe
ThirdwebClienttype import is properly added to support the new prop.
11-11: LGTM: Clean prop drilling implementationThe
clientprop is properly added to the interface, component parameters, and passed down to childRefContractInputcomponents. 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 importThe
ThirdwebClienttype import follows the same pattern as other files in this refactor.
12-12: LGTM: Consistent prop drilling patternThe
clientprop is properly added to the interface, component parameters, and passed down to childRefBytesContractInputcomponents, 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 authenticationThe 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 fetchingAdding
authTokento thePromise.allmaintains the efficient concurrent fetching pattern while adding the necessary authentication data.
35-38: LGTM: Proper client creationThe
getClientThirdwebClientcall correctly uses the authenticated token and team ID to create the client instance.
47-47: LGTM: Client prop propagationThe
clientprop is properly passed to theInAppWalletSettingsPagecomponent, 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
ThirdwebClientdependency by:
- Adding the required type import
- Updating the interface to include the
clientprop- Accepting the client parameter in the component
- Correctly passing it down to
AccountProviderThis follows the broader refactoring goal of removing internal
useThirdwebClienthook 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
ThirdwebClienttype- Updates the interface to require the
clientprop- Passes the client down to
NFTMediaWithEmptyStateThis 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 theclientparameter for address validation viacheckIsAddress, 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.allto 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
PublishedContractcomponent. ThegetClientThirdwebClientfunction 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
useThirdwebClientinternally.apps/dashboard/src/tw-components/nft-media.tsx (1)
5-5: LGTM: Clean refactor to explicit client passingThe changes correctly implement the architectural shift from internal
useThirdwebClientusage 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 updatesThe 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 signatureThe
usePublishedContractsQuerycall is correctly updated to pass an object with bothclientandaddressproperties, indicating the hook signature was changed to require explicit client passing.
50-50: LGTM: useAllVersions updated with client parameterThe
useAllVersionshook call is correctly updated to include theclientparameter, 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 signatureThe
useCustomFactoryAbihook call is correctly updated to includeclientas 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 updateThe import of
getClientThirdwebClientand addition of the optionalauthTokenparameter to the function signature are correctly implemented to support authenticated client creation.Also applies to: 31-31
48-57: LGTM: Authenticated client creation and passingThe client creation using
getClientThirdwebClientwith JWT and team context is correctly implemented. The client is properly passed toConfigureCustomChainonly 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
useThirdwebClienthook 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
teamIdfor logged-out cases is appropriate and ensures thatHeaderLoggedOutreceives 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
lastUsedTeamClientnaming 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
clientprop and its usage in thegetContractcall properly replaces the previoususeThirdwebClienthook 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
clientprop to thePropsinterface and its usage in thecheckIsAddresscall correctly removes the internaluseThirdwebClienthook 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 integrationThe addition of the
clientprop 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 functionThe 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 componentThe
PublisherHeadercomponent now receives the client prop, ensuring consistent client context throughout the component hierarchy.
197-200: LGTM: Client used correctly in IPFS URL replacementThe client is properly used in the
replaceIpfsUrlfunction call for audit report link generation.
269-313: LGTM: Function signature and implementation updated consistentlyThe
fetchSourceFilesFromMetadatafunction correctly accepts the client parameter and uses it appropriately in thedownloadfunction 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 typingThe
ThirdwebClientimport and prop addition toTokenAirdropSectionfollows the established pattern for explicit client dependency injection.Also applies to: 51-51
163-163: LGTM: Client prop correctly propagated to child componentThe client is properly passed down to the
AirdropUploadcomponent, maintaining the client context through the component hierarchy.
193-193: LGTM: Consistent client integration in AirdropUploadThe client prop is correctly added to the
AirdropUploadPropsinterface, accepted in the component parameters, and properly passed to theuseCsvUploadhook. 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 importsThe removal of
ThirdwebClientimport is appropriate since the function now usescontract.clientinstead of accepting a separate client parameter.
24-24: LGTM: Cleaner function interfaceRemoving the
clientparameter simplifies the function interface while maintaining functionality by usingcontract.clientinternally.
26-28: LGTM: Simplified function callThe
fetchPublishedContractsFromDeploycall 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.clientUsing
contract.clientinstead 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 integrationThe
ThirdwebClientimport and addition to theSnapshotUploadPropsinterface correctly follows the pattern for explicit client dependency injection.Also applies to: 33-33
53-53: LGTM: Client parameter correctly added to componentThe client parameter is properly integrated into the
SnapshotViewerSheetContentcomponent signature.
64-68: LGTM: Client correctly passed to useCsvUpload hookThe client is properly passed to the
useCsvUploadhook 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
ThirdwebClienttype 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
usePublishedContractsQuerycall has been properly updated from passing just the address to passing an object containing bothclientandaddress, which aligns with the refactoring to remove theuseThirdwebClienthook.
47-55: LGTM! Client parameter correctly added to useAllVersions hook.The
useAllVersionshook call has been properly updated to accept theclientparameter 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
ThirdwebClienttype 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, andHeaderLoggedOut) have been consistently updated to accept theclientprop, 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
HeaderLoggedOutcomponent to both desktop and mobile UI components, and further to theMobileBurgerMenuButton, 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
ThirdwebClienttype 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
NFTMediaWithEmptyStatecomponent, 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
ThirdwebClienttype 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:
CustomChainRendererreceives the client for chain operations- The network switcher modal options include the client
ChainIconClientreceives the client for icon renderingLazyConfigureNetworkModalreceives the client for network configurationThis 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
ThirdwebClientand 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
getDashboardChainRpcfunction call, maintaining consistency with the refactor to explicit client passing.
379-383: LGTM: Client properly passed to child components.Both
ChainIconClientandIconUploadcomponents 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
ThirdwebClienttype and removes the no-longer-neededuseThirdwebClienthook, aligning with the refactor objectives.
10-14: LGTM: Hook signature updated to accept explicit client parameter.The
useAccountCounthook correctly accepts theThirdwebClientparameter and uses it in thegetContractcall, 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
FactoryAccountCellcomponent correctly accepts the client prop and passes it to theuseAccountCounthook, 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.clientinstead, theThirdwebClientimport is correctly removed.
23-23: LGTM: Function signature simplified.Removing the explicit
clientparameter simplifies the function interface while maintaining functionality by usingcontract.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
getClientThirdwebClientandThirdwebClientare 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
getClientThirdwebClientwith 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 (
YourFactoriesSection→AsyncYourFactories→FactoryContracts), 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
clientprop of typeThirdwebClient, replacing the internaluseThirdwebClienthook 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
clientprop is properly passed to bothreplaceIpfsUrlandSolidityInputcomponent, 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
clientprop of typeThirdwebClient, following the consistent refactor pattern.Also applies to: 24-24, 32-32
36-41: Hook usage correctly updated to new signatures.Both
usePublishedContractsQueryanduseAllVersionshooks are now called with the explicitclientparameter, matching their updated signatures. The object parameter style forusePublishedContractsQueryis 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
clientprop, replacing internal client acquisition with explicit dependency injection.Also applies to: 23-23, 25-28
29-32: Hook and component usage updated correctly.The
useEnshook is now called with the correct object parameter containingclientandaddressOrEnsName, and theAccountProvidercomponent properly receives theclientprop. 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: stringtoisLoggedIn: booleanand addedclient: 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 theclientparameter, 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
jwtpresence to checking theisLoggedInboolean, 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 theclientprop, 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 updateThe component signature has been properly updated to receive the
clientandisLoggedInprops directly. This follows the intended refactoring pattern of removing theuseThirdwebClienthook dependency.
133-136: LGTM: Proper client prop usage in hookThe
useEnshook call has been correctly updated to use theclientprop instead of relying on the internaluseThirdwebClienthook.
266-266: LGTM: Consistent client usage in contract operationsThe
getContractPublishercall correctly usesprops.client, maintaining consistency with the refactoring pattern.
334-334: LGTM: Proper client prop propagation to child componentsAll child components (
LandingFieldset,ContractParamsFieldset,ImplementationParamsFieldset,FactoryFieldset,NetworksFieldset, andCustomConnectWallet) are correctly receiving theclientprop. 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 correctlyThe
InAppWalletSettingsPagePropstype has been properly extended to include theclient: ThirdwebClientprop.
161-161: LGTM: Consistent client prop propagationThe
clientprop is correctly threaded through the component hierarchy:InAppWalletSettingsPageUI→InAppWalletSettingsUI→BrandingFieldset→AppImageFormControl. This maintains a clean dependency injection pattern.Also applies to: 174-174, 281-281, 333-333
426-426: LGTM: Proper client usage in file operationsThe
AppImageFormControlcomponent correctly uses theclientprop for:
- URL resolution with
resolveSchemeWithErrorHandler- File upload operations with the
uploadfunctionThis 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 correctlyBoth
FileImageandFileVideocomponents have been properly updated to accept theclient: ThirdwebClientprop and use it for IPFS URL resolution withreplaceIpfsUrl.Also applies to: 46-52
64-64: LGTM: Props interface and component signature updatedThe
BatchTablePropsinterface and component signature have been correctly updated to include theclientprop, maintaining type safety throughout the component.Also applies to: 71-71
93-93: LGTM: Client prop passed to media componentsThe
clientprop is correctly passed to bothFileImageandFileVideocomponents 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 updatedThe
useMemodependency array correctly includes theclientprop. 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 correctlyThe
useAllVersionshook has been properly updated to acceptclient: ThirdwebClientas a parameter and uses it in thefetchPublishedContractVersionscall.
108-118: LGTM: Clean parameter object patternThe
usePublishedContractsQueryhook 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 tofetchPublishedContracts.
179-185: LGTM: Consistent parameter pattern with useEnsThe
useEnshook follows the same parameter object pattern and correctly passes the client to theensQueryfunction. This maintains consistency with other updated hooks.
191-196: LGTM: Client as first parameterThe
useCustomFactoryAbihook correctly accepts theclientas the first parameter and uses it when creating the contract instance withgetContract.
108-118:✅ Verification successful
Note: These are breaking changes
The hook signature changes in
usePublishedContractsQueryanduseEnsare breaking changes that will require updates in all consuming components. This appears intentional as part of the broader refactoring to removeuseThirdwebClient.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 1Length 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
clientparameter—and no stale usages remain:
usePublishedContractsQueryin all contract-publish-form components andModuleForm.tsxuseEnsacrossMobileBurgerMenuButton.tsx,account-button.client.tsx, contract-publish-form, publisher header, andaddress-input.tsxuseAllVersionsin decoded-bytes-input, ref-input-impl, ref-input, andModuleForm.tsxuseCustomFactoryAbiin custom-factory and custom-contract formsNo further updates are needed.
...app/(app)/team/[team_slug]/[project_slug]/(sidebar)/connect/in-app-wallets/settings/page.tsx
Show resolved
Hide resolved
Merge activity
|
5fc9198 to
1c11f84
Compare
<!--
## 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 -->
e171fb9 to
a46395b
Compare
<!--
## 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 -->
a46395b to
6ae54dd
Compare

PR-Codex overview
This PR focuses on enhancing the integration of the
ThirdwebClientacross various components in the application, ensuring that client instances are consistently passed to functions and components that require them.Detailed summary
clientprop to multiple components, includingNFTMediaWithEmptyState,MarketplaceDetails, andTeamHeaderUI.clientas a parameter for contract interactions.useEnsandusePublishedContractsQueryto acceptclient.clientprop for improved functionality and consistency.Summary by CodeRabbit