-
Notifications
You must be signed in to change notification settings - Fork 544
Dashboard: Reduce useThirdwebClient hook usage #4 #7227
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: Reduce useThirdwebClient hook usage #4 #7227
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the WalkthroughThis update standardizes the explicit passing of a Changes
Sequence Diagram(s)sequenceDiagram
participant ParentComponent
participant TransactionButton
participant MismatchButton
participant ThirdwebClient
ParentComponent->>TransactionButton: Render with client={clientInstance}
TransactionButton->>MismatchButton: Render with client={clientInstance}
MismatchButton->>ThirdwebClient: Use clientInstance for transactions
sequenceDiagram
participant Page
participant EngineOverview
participant BackendWalletsSection
participant RelayersTable
participant ThirdwebClient
Page->>EngineOverview: Pass client={clientInstance}
EngineOverview->>BackendWalletsSection: Pass client={clientInstance}
EngineOverview->>RelayersTable: Pass client={clientInstance}
BackendWalletsSection->>ThirdwebClient: Use clientInstance
RelayersTable->>ThirdwebClient: Use clientInstance
Suggested reviewers
🪧 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. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #7227 +/- ##
=======================================
Coverage 55.62% 55.62%
=======================================
Files 908 908
Lines 58575 58575
Branches 4134 4134
=======================================
Hits 32582 32582
Misses 25887 25887
Partials 106 106
🚀 New features to boost your workflow:
|
size-limit report 📦
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
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
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (69)
apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/(marketplace)/components/cancel-tab.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]/_components/claim-conditions/claim-conditions-form/index.tsx
(1 hunks)apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/_components/claim-conditions/reset-claim-eligibility.tsx
(1 hunks)apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/account/components/deposit-native.tsx
(1 hunks)apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/accounts/components/create-account-button.tsx
(1 hunks)apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/modules/components/BatchMetadata.tsx
(5 hunks)apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/modules/components/Claimable.tsx
(11 hunks)apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/modules/components/Mintable.tsx
(8 hunks)apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/modules/components/ModuleForm.tsx
(1 hunks)apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/modules/components/OpenEditionMetadata.tsx
(4 hunks)apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/modules/components/Royalty.tsx
(10 hunks)apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/modules/components/Transferable.tsx
(1 hunks)apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/modules/components/module-card.tsx
(1 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/burn-tab.tsx
(1 hunks)apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/nfts/[tokenId]/components/claim-tab.tsx
(1 hunks)apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/nfts/[tokenId]/components/mint-supply-tab.tsx
(1 hunks)apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/nfts/[tokenId]/components/transfer-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/components/batch-lazy-mint-button.tsx
(1 hunks)apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/nfts/components/claim-button.tsx
(1 hunks)apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/nfts/components/lazy-mint-form.tsx
(1 hunks)apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/nfts/components/mint-form.tsx
(1 hunks)apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/nfts/components/reveal-button.tsx
(1 hunks)apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/nfts/components/shared-metadata-form.tsx
(1 hunks)apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/permissions/components/index.tsx
(1 hunks)apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/proposals/components/delegate-button.tsx
(1 hunks)apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/proposals/components/proposal-button.tsx
(1 hunks)apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/proposals/components/proposal.tsx
(3 hunks)apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/public-pages/erc20/_components/claim-tokens/claim-tokens-ui.tsx
(1 hunks)apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/settings/components/metadata.tsx
(1 hunks)apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/settings/components/platform-fees.tsx
(1 hunks)apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/settings/components/primary-sale.tsx
(1 hunks)apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/settings/components/royalties.tsx
(1 hunks)apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/split/components/distribute-button.tsx
(2 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/burn-button.tsx
(1 hunks)apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/tokens/components/claim-button.tsx
(1 hunks)apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/tokens/components/mint-button.tsx
(1 hunks)apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/tokens/components/transfer-button.tsx
(1 hunks)apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/ecosystem/[slug]/(active)/configuration/components/client/allowed-operations-section.tsx
(4 hunks)apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/assets/create/launch/launch-token.tsx
(1 hunks)apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(instance)/[engineId]/contract-subscriptions/components/add-contract-subscription-button.tsx
(10 hunks)apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(instance)/[engineId]/contract-subscriptions/components/contract-subscriptions-table.tsx
(4 hunks)apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(instance)/[engineId]/contract-subscriptions/components/engine-contract-subscription.tsx
(2 hunks)apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(instance)/[engineId]/contract-subscriptions/page.tsx
(2 hunks)apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(instance)/[engineId]/overview/components/engine-overview.tsx
(1 hunks)apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(instance)/[engineId]/page.tsx
(2 hunks)apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(instance)/[engineId]/relayers/components/add-relayer-button.tsx
(3 hunks)apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(instance)/[engineId]/relayers/components/engine-relayer.tsx
(2 hunks)apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(instance)/[engineId]/relayers/components/relayers-table.tsx
(7 hunks)apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(instance)/[engineId]/relayers/page.tsx
(1 hunks)apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/webhooks/components/CreateWebhookModal.tsx
(7 hunks)apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/webhooks/components/FilterDetailsStep.tsx
(5 hunks)apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/webhooks/components/WebhooksTable.tsx
(3 hunks)apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/webhooks/page.tsx
(4 hunks)apps/dashboard/src/app/nebula-app/(app)/chat/[session_id]/page.tsx
(2 hunks)apps/dashboard/src/app/nebula-app/(app)/chat/page.tsx
(2 hunks)apps/dashboard/src/app/nebula-app/(app)/components/ChatPageContent.tsx
(4 hunks)apps/dashboard/src/app/nebula-app/(app)/components/ExecuteTransactionCard.tsx
(1 hunks)apps/dashboard/src/app/nebula-app/(app)/components/Swap/SwapCards.tsx
(2 hunks)apps/dashboard/src/app/nebula-app/(app)/page.tsx
(2 hunks)apps/dashboard/src/app/nebula-app/login/NebulaConnectEmbedLogin.tsx
(3 hunks)apps/dashboard/src/components/buttons/MismatchButton.tsx
(5 hunks)apps/dashboard/src/components/buttons/TransactionButton.stories.tsx
(1 hunks)apps/dashboard/src/components/buttons/TransactionButton.tsx
(4 hunks)apps/dashboard/src/components/contract-functions/interactive-abi-function.tsx
(1 hunks)apps/dashboard/src/core-ui/batch-upload/batch-lazy-mint.tsx
(3 hunks)
🧰 Additional context used
🧬 Code Graph Analysis (17)
apps/dashboard/src/components/buttons/TransactionButton.stories.tsx (1)
apps/dashboard/src/stories/utils.tsx (1)
storybookThirdwebClient
(47-50)
apps/dashboard/src/app/nebula-app/(app)/chat/page.tsx (1)
apps/dashboard/src/app/nebula-app/(app)/utils/nebulaThirdwebClient.ts (1)
nebulaAppThirdwebClient
(46-46)
apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(instance)/[engineId]/page.tsx (2)
apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/_utils/getEngineInstancePageMeta.ts (1)
engineInstancePageHandler
(9-44)packages/engine/src/client/client.gen.ts (1)
client
(24-28)
apps/dashboard/src/app/nebula-app/(app)/page.tsx (1)
apps/dashboard/src/app/nebula-app/(app)/utils/nebulaThirdwebClient.ts (1)
nebulaAppThirdwebClient
(46-46)
apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(instance)/[engineId]/contract-subscriptions/page.tsx (2)
apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/_utils/getEngineInstancePageMeta.ts (1)
engineInstancePageHandler
(9-44)packages/engine/src/client/client.gen.ts (1)
client
(24-28)
apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/account/components/deposit-native.tsx (1)
packages/engine/src/client/client.gen.ts (1)
client
(24-28)
apps/dashboard/src/app/nebula-app/(app)/chat/[session_id]/page.tsx (1)
apps/dashboard/src/app/nebula-app/(app)/utils/nebulaThirdwebClient.ts (1)
nebulaAppThirdwebClient
(46-46)
apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(instance)/[engineId]/relayers/page.tsx (3)
apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/_utils/getEngineInstancePageMeta.ts (1)
engineInstancePageHandler
(9-44)apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(instance)/[engineId]/relayers/components/engine-relayer.tsx (1)
EngineRelayer
(15-58)packages/engine/src/client/client.gen.ts (1)
client
(24-28)
apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(instance)/[engineId]/relayers/components/engine-relayer.tsx (2)
packages/thirdweb/src/exports/thirdweb.ts (1)
ThirdwebClient
(26-26)apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(instance)/[engineId]/relayers/components/add-relayer-button.tsx (1)
AddRelayerButton
(38-68)
apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(instance)/[engineId]/contract-subscriptions/components/engine-contract-subscription.tsx (2)
packages/thirdweb/src/exports/thirdweb.ts (1)
ThirdwebClient
(26-26)packages/engine/src/client/client.gen.ts (1)
client
(24-28)
apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/modules/components/BatchMetadata.tsx (1)
packages/thirdweb/src/exports/thirdweb.ts (1)
ThirdwebClient
(26-26)
apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/modules/components/OpenEditionMetadata.tsx (1)
packages/thirdweb/src/exports/thirdweb.ts (1)
ThirdwebClient
(26-26)
apps/dashboard/src/app/nebula-app/login/NebulaConnectEmbedLogin.tsx (2)
apps/dashboard/src/app/nebula-app/(app)/utils/nebulaThirdwebClient.ts (1)
nebulaAppThirdwebClient
(46-46)packages/thirdweb/src/exports/thirdweb.ts (1)
ThirdwebClient
(26-26)
apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/modules/components/Royalty.tsx (1)
packages/thirdweb/src/exports/thirdweb.ts (1)
ThirdwebClient
(26-26)
apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/modules/components/Mintable.tsx (1)
packages/thirdweb/src/exports/thirdweb.ts (1)
ThirdwebClient
(26-26)
apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(instance)/[engineId]/contract-subscriptions/components/add-contract-subscription-button.tsx (2)
packages/thirdweb/src/exports/thirdweb.ts (1)
ThirdwebClient
(26-26)packages/engine/src/client/client.gen.ts (1)
client
(24-28)
apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/modules/components/Claimable.tsx (1)
packages/thirdweb/src/exports/thirdweb.ts (1)
ThirdwebClient
(26-26)
⏰ Context from checks skipped due to timeout of 90000ms (2)
- GitHub Check: Graphite / mergeability_check
- GitHub Check: Graphite / mergeability_check
🔇 Additional comments (110)
apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/nfts/[tokenId]/components/airdrop-tab.tsx (1)
165-165
: LGTM! Clean dependency injection refactor.The addition of
client={contract.client}
to the TransactionButton follows the established pattern of explicitly passing ThirdwebClient instances instead of relying on internal hooks. The contract prop is already validated and available, making this a safe and consistent change.apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/tokens/components/transfer-button.tsx (1)
104-104
: LGTM! Consistent with refactor pattern.The explicit client prop addition to TransactionButton maintains consistency with the broader refactor to standardize ThirdwebClient dependency injection. The implementation correctly sources the client from the contract prop.
apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/nfts/components/batch-lazy-mint-button.tsx (1)
71-71
: LGTM! Proper client prop propagation.The addition of
client={contract.client}
to the BatchLazyMint component correctly propagates the ThirdwebClient instance down the component tree. This maintains consistency with the refactor pattern, even though the client is ultimately used by an internal TransactionButton within BatchLazyMint.apps/dashboard/src/app/nebula-app/(app)/chat/page.tsx (1)
7-7
: LGTM! Proper use of pre-configured client.The import and usage of
nebulaAppThirdwebClient
correctly implements the dependency injection pattern for the nebula app context. Using a pre-configured client from the utils module is appropriate for this page component and aligns with the broader refactor to eliminate internaluseThirdwebClient
hook usage.Also applies to: 23-23
apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/settings/components/primary-sale.tsx (1)
147-147
: LGTM! Consistent client prop addition.The addition of
client={contract.client}
to the TransactionButton follows the expected pattern for this refactor. The change is consistent with howcontract.client
is already being used elsewhere in the component (line 130) and supports the goal of making ThirdwebClient dependencies explicit.apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/settings/components/royalties.tsx (1)
186-186
: LGTM! Proper client prop integration.The
client={contract.client}
prop addition is correctly implemented and consistent with the established pattern. The component already usescontract.client
for the SolidityInput component (line 144), confirming the client property is properly available.apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/tokens/components/burn-button.tsx (1)
101-101
: LGTM! Client prop correctly added.The addition of
client={contract.client}
maintains consistency with the refactor pattern. The contract object is already being used extensively throughout the component for ERC20 operations, confirming the client property is available and the change is appropriate.apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/accounts/components/create-account-button.tsx (1)
64-64
: LGTM! Consistent with refactor pattern.The
client={contract.client}
prop addition follows the established pattern and is consistent with the systematic refactor to make ThirdwebClient dependencies explicit. The contract object is already used throughout the component for ERC4337 operations, ensuring the client property is properly available.apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/settings/components/metadata.tsx (1)
333-333
: LGTM! Proper client dependency injection.The addition of
client={contract.client}
correctly makes the ThirdwebClient dependency explicit for the TransactionButton component. This aligns with the PR objective to reduce useThirdwebClient hook usage and improves dependency management.apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/nfts/[tokenId]/components/mint-supply-tab.tsx (1)
129-129
: LGTM! Consistent client prop implementation.The addition of
client={contract.client}
properly passes the ThirdwebClient instance to the TransactionButton component. This maintains consistency with the broader refactoring effort to make client dependencies explicit.apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/nfts/components/claim-button.tsx (1)
110-110
: LGTM! Proper client dependency management.The explicit passing of
client={contract.client}
to the TransactionButton component correctly implements the dependency injection pattern. This enhances the component's explicitness about its ThirdwebClient dependency.apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/nfts/components/reveal-button.tsx (1)
156-156
: LGTM! Completes the consistent client prop pattern.The addition of
client={contract.client}
to the TransactionButton component properly implements the explicit client dependency pattern. This change aligns perfectly with the PR's objective to reduce useThirdwebClient hook usage across the dashboard.apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/public-pages/erc20/_components/claim-tokens/claim-tokens-ui.tsx (1)
389-389
: LGTM! Excellent architectural improvement.The explicit passing of
client={props.contract.client}
to theTransactionButton
improves dependency management by making the ThirdwebClient dependency explicit rather than relying on internal hooks. This enhances testability and maintainability.apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/nfts/components/shared-metadata-form.tsx (1)
293-293
: LGTM! Consistent implementation.The addition of
client={contract.client}
follows the established pattern for this refactoring. The explicit client prop improves code clarity and dependency management.apps/dashboard/src/components/contract-functions/interactive-abi-function.tsx (1)
543-543
: LGTM! Solid architectural improvement.Adding
client={contract.client}
to theTransactionButton
makes the client dependency explicit and improves the component's testability. This change aligns perfectly with the codebase-wide refactoring effort.apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/nfts/[tokenId]/components/burn-tab.tsx (1)
133-133
: LGTM! Completes the consistent refactoring pattern.The addition of
client={contract.client}
to theTransactionButton
is correct and maintains consistency with the architectural improvements being made across the codebase. This explicit dependency management enhances code clarity and maintainability.apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/nfts/[tokenId]/components/claim-tab.tsx (1)
127-127
: LGTM: Proper client prop addition to TransactionButtonThe addition of
client={contract.client}
is consistent with the refactoring effort to explicitly pass the ThirdwebClient instance to TransactionButton components. This improves dependency management by making the client dependency explicit rather than relying on internal hooks.apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/settings/components/platform-fees.tsx (1)
179-179
: LGTM: Consistent client prop additionThe addition of
client={contract.client}
maintains consistency with the broader refactoring effort. The change is correctly placed within the AdminOnly wrapper and follows the established pattern.apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/modules/components/ModuleForm.tsx (1)
389-389
: LGTM: Client prop addition aligns with existing usageThe addition of
client={contract.client}
is consistent with existing usage ofcontract.client
elsewhere in this file (lines 183, 256), confirming the property is available and properly accessible.apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/nfts/[tokenId]/components/transfer-tab.tsx (1)
134-134
: LGTM: Client prop addition consistent with existing usageThe addition of
client={contract.client}
aligns with existing usage ofcontract.client
on line 106, demonstrating that the client property is properly available on the ThirdwebContract instance.apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/proposals/components/proposal.tsx (1)
140-140
: LGTM! Client prop addition is correct and consistent.The addition of
client={contract.client}
to all threeTransactionButton
instances properly provides the required client instance for transaction execution. This change aligns perfectly with the broader refactoring effort to explicitly passThirdwebClient
instances rather than relying on internal hooks.Also applies to: 155-155, 171-171
apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/modules/components/module-card.tsx (1)
164-164
: LGTM! Proper client instance provided for transaction execution.The addition of
client={contract.client}
to the uninstallTransactionButton
correctly provides the required client instance. This maintains the existing functionality while conforming to the new component API requirements.apps/dashboard/src/components/buttons/TransactionButton.stories.tsx (1)
193-193
: LGTM! Appropriate client instance for Storybook environment.The addition of
client={storybookThirdwebClient}
properly provides the required client instance for the Storybook story. Using the dedicated storybook client ensures the component renders correctly in the testing environment while conforming to the new API requirements.apps/dashboard/src/app/nebula-app/(app)/components/ExecuteTransactionCard.tsx (1)
132-132
: LGTM! Correct client prop forwarding from parent component.The addition of
client={props.client}
properly forwards the client instance from the parent component to theTransactionButton
. This maintains the existing transaction execution flow while conforming to the new component API that requires explicit client passing.apps/dashboard/src/app/nebula-app/(app)/chat/[session_id]/page.tsx (1)
9-9
: LGTM! Clean dependency injection pattern.The import and explicit passing of
nebulaAppThirdwebClient
as a prop follows the established pattern of reducinguseThirdwebClient
hook usage in favor of explicit dependency injection. This improves testability and makes dependencies more transparent.Also applies to: 38-38
apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/proposals/components/delegate-button.tsx (1)
41-41
: LGTM! Consistent client prop passing.The addition of
client={contract.client}
to theTransactionButton
aligns with the standardization effort to pass ThirdwebClient instances explicitly. This change maintains the existing functionality while improving dependency management.apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/modules/components/Transferable.tsx (1)
188-188
: LGTM! Proper client prop propagation.The addition of
client={props.client}
correctly passes the client instance from the component props to theTransactionButton
. This maintains the clean prop flow established in the parent component wherecontract.client
is passed down as theclient
prop.apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/tokens/components/airdrop-form.tsx (1)
138-138
: LGTM! Consistent with the standardization effort.The addition of
client={contract.client}
to theTransactionButton
follows the established pattern throughout this PR. This change ensures that the transaction button receives the client instance explicitly, improving dependency management and consistency across the codebase.apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/(marketplace)/components/list-form.tsx (1)
662-662
: LGTM! Consistent client prop addition.This change correctly adds the
client
prop to theTransactionButton
component, passing theThirdwebClient
instance fromcontract.client
. This aligns with the PR's objective of standardizing the explicit passing of the client instance to reduceuseThirdwebClient
hook usage.apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/(marketplace)/components/cancel-tab.tsx (1)
33-33
: LGTM! Consistent implementation of client prop pattern.The addition of
client={contract.client}
follows the same standardization pattern established across the codebase. The change maintains all existing functionality while ensuring theTransactionButton
receives theThirdwebClient
instance explicitly.apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/nfts/components/mint-form.tsx (1)
368-368
: LGTM! Proper client prop integration.The addition of
client={contract.client}
maintains the consistent pattern of explicitly passing theThirdwebClient
instance toTransactionButton
components. This change integrates well with the existing contract usage throughout the component.apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/proposals/components/proposal-button.tsx (1)
109-109
: LGTM! Completes the consistent client prop standardization.The addition of
client={contract.client}
maintains the established pattern across all reviewed files. This change successfully standardizes how theThirdwebClient
instance is passed toTransactionButton
components, supporting the PR's objective of reducinguseThirdwebClient
hook usage.apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/tokens/components/claim-button.tsx (1)
97-97
: LGTM: Explicit client prop passing improves dependency management.The addition of
client={contract.client}
properly passes the ThirdwebClient instance from the contract to the TransactionButton component. This change aligns with the PR's objective to reduceuseThirdwebClient
hook usage and makes dependencies more explicit and testable.apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/permissions/components/index.tsx (1)
130-130
: LGTM: Consistent client prop pattern for transaction handling.The addition of
client={contract.client}
follows the same pattern as other components in this PR, explicitly providing the ThirdwebClient instance to the TransactionButton. This improves dependency injection and reduces reliance on internal hooks.apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/_components/claim-conditions/reset-claim-eligibility.tsx (1)
97-97
: LGTM: Proper client dependency injection for transaction button.The addition of
client={contract.client}
maintains consistency with the broader refactoring effort. The client is correctly sourced from the contract instance and passed explicitly to the TransactionButton component.apps/dashboard/src/app/nebula-app/(app)/page.tsx (2)
8-8
: LGTM: Proper import of nebula-specific client.The import of
nebulaAppThirdwebClient
from the utils module follows good practices for dependency management in the nebula app context.
32-32
: LGTM: Explicit client prop passing to ChatPageContent.The addition of
client={nebulaAppThirdwebClient}
properly passes the nebula-specific ThirdwebClient instance to the ChatPageContent component, maintaining consistency with the PR's objective to explicitly inject client dependencies rather than using internal hooks.apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/tokens/components/mint-button.tsx (1)
127-127
: LGTM! Client prop correctly passed to TransactionButton.The explicit passing of
contract.client
to theTransactionButton
component aligns perfectly with the PR objective to reduceuseThirdwebClient
hook usage and standardize transaction management. The client instance is readily available from the contract prop.apps/dashboard/src/app/nebula-app/(app)/components/Swap/SwapCards.tsx (2)
95-95
: LGTM! Client prop correctly passed in SwapTransactionCardLayout.The explicit passing of
props.client
to theTransactionButton
ensures consistent transaction handling with the provided ThirdwebClient instance.
215-215
: LGTM! Client prop correctly passed in ApproveTransactionCardLayout.The explicit passing of
props.client
to theTransactionButton
maintains consistency with the transaction management pattern across both swap and approve transaction flows.apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/account/components/deposit-native.tsx (1)
51-51
: LGTM! Client prop correctly passed to TransactionButton.The explicit passing of the
client
prop to theTransactionButton
component properly implements the architectural improvement to make client dependencies explicit rather than relying on internal hooks.apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/nfts/[tokenId]/components/update-metadata-form.tsx (1)
410-410
: LGTM! Client prop correctly passed to TransactionButton.The explicit passing of
contract.client
to theTransactionButton
component successfully implements the standardized pattern for client dependency injection, improving transaction management consistency across the NFT metadata update flow.apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/nfts/components/lazy-mint-form.tsx (1)
344-344
: LGTM! Correct implementation of client prop injection.The addition of
client={contract.client}
to the TransactionButton follows the refactoring pattern to explicitly pass the ThirdwebClient instance rather than relying on internal hooks. This improves dependency injection and component testability.apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/assets/create/launch/launch-token.tsx (1)
177-177
: LGTM! Proper client prop forwarding.The addition of
client={props.client}
correctly forwards the ThirdwebClient instance from the component props to the TransactionButton, maintaining consistency with the refactoring pattern.apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/split/components/distribute-button.tsx (1)
80-80
: LGTM! Consistent client prop implementation across both TransactionButton instances.Both TransactionButton components are correctly updated with
client={contract.client}
, ensuring consistent behavior in both the error state and normal rendering paths. This maintains the dependency injection pattern throughout the component.Also applies to: 104-104
apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(instance)/[engineId]/contract-subscriptions/page.tsx (1)
7-7
: LGTM! Correct client extraction and forwarding.The changes properly destructure the
client
from theengineInstancePageHandler
result and forward it to theEngineContractSubscriptions
component. This maintains the dependency injection pattern for the ThirdwebClient instance.Also applies to: 17-17
apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/_components/claim-conditions/claim-conditions-form/index.tsx (1)
661-661
: LGTM! Clean refactoring to explicit client passing.The addition of
client={contract.client}
to the TransactionButton follows the established pattern of explicitly passing ThirdwebClient instances rather than relying on internal hooks. This improves dependency clarity and aligns with the broader codebase refactor.apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(instance)/[engineId]/page.tsx (2)
7-7
: LGTM! Proper client extraction from handler.The destructuring of
client
fromengineInstancePageHandler
correctly implements the explicit client passing pattern. The relevant code snippets confirm that the handler now returns a properly configured ThirdwebClient instance.
19-19
: LGTM! Correct client propagation to child component.Passing the
client
prop to the EngineOverview component maintains the explicit dependency injection pattern and ensures the client is available for transaction operations in child components.apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(instance)/[engineId]/relayers/page.tsx (2)
7-7
: LGTM! Consistent client extraction pattern.The destructuring of
client
fromengineInstancePageHandler
follows the same pattern as other engine pages, maintaining consistency across the codebase.
13-19
: LGTM! Proper client propagation to EngineRelayer.The client prop is correctly passed to the EngineRelayer component, which will forward it to child components like RelayersTable and AddRelayerButton as shown in the relevant code snippets.
apps/dashboard/src/core-ui/batch-upload/batch-lazy-mint.tsx (3)
22-22
: LGTM! Proper type import for ThirdwebClient.Adding the ThirdwebClient type import is necessary for the interface update and maintains type safety.
57-57
: LGTM! Interface correctly updated with client prop.The addition of
client: ThirdwebClient
to the BatchLazyMintEVMProps interface properly requires explicit client passing and maintains type safety.
267-267
: LGTM! Client correctly passed to TransactionButton.The
client={props.client}
prop ensures the TransactionButton has access to the ThirdwebClient instance for transaction execution, completing the explicit dependency injection pattern.apps/dashboard/src/components/buttons/TransactionButton.tsx (1)
15-15
: LGTM! Clean refactoring to explicit client prop.The addition of the explicit
client
prop toTransactionButton
improves the component's API by making dependencies explicit rather than hidden behind hooks. This enhances testability and makes the component's requirements clearer.Also applies to: 34-34, 45-45, 70-70
apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(instance)/[engineId]/relayers/components/engine-relayer.tsx (1)
4-4
: LGTM! Consistent client prop propagation.The changes correctly implement the explicit client prop pattern, receiving the
ThirdwebClient
instance and passing it down to bothRelayersTable
andAddRelayerButton
components. This maintains consistency with the broader refactoring effort.Also applies to: 12-12, 18-18, 49-55
apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(instance)/[engineId]/contract-subscriptions/components/engine-contract-subscription.tsx (1)
10-10
: LGTM! Proper client prop implementation.The changes correctly implement the explicit client prop pattern for the contract subscriptions component. The
ThirdwebClient
instance is properly typed, received, and passed down to child components that require it for transaction operations.Also applies to: 14-14, 19-19, 65-65, 70-70
apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/modules/components/BatchMetadata.tsx (1)
26-26
: LGTM! Excellent client prop threading pattern.The changes demonstrate a clean implementation of the client prop propagation pattern:
BatchMetadataModule
extractscontract.client
and passes it to the UI componentBatchMetadataModuleUI
receives and forwards the client to the section componentUploadMetadataNFTSection
passes the client toTransactionButton
This creates a clear dependency chain that makes the client requirement explicit at each level, improving maintainability and testability.
Also applies to: 97-97, 108-108, 126-126, 169-169, 268-268
apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/webhooks/components/WebhooksTable.tsx (2)
19-19
: LGTM! Clean interface updates and consistent prop naming.The addition of the
ThirdwebClient
import and the interface updates are well-structured. The renaming fromclientId
toprojectClientId
provides better clarity, and the newclient
prop follows the established pattern for explicit client dependency injection.Also applies to: 35-37, 42-43
47-47
: Consistent prop usage throughout the component.The renamed
projectClientId
and newclient
prop are correctly used in all the appropriate places - hook calls, API calls, and child component props. The prop threading is properly implemented.Also applies to: 55-55, 222-224
apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(instance)/[engineId]/relayers/components/add-relayer-button.tsx (2)
28-28
: Proper type imports and interface updates.The
ThirdwebClient
type import and interface updates are correctly implemented. The newclient
prop is properly added to theAddRelayerButtonProps
interface and function signature.Also applies to: 35-35, 41-41
63-63
: Excellent prop threading through component hierarchy.The
client
prop is correctly passed fromAddRelayerButton
toAddModal
and then toSingleNetworkSelector
. The interface forAddModal
is properly updated to include theclient
parameter.Also applies to: 82-82, 87-87, 161-161
apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/modules/components/OpenEditionMetadata.tsx (1)
103-103
: Proper client prop implementation for SetSharedMetadataSection.The
SetSharedMetadataSection
component correctly receives and uses theclient
prop. The interface is properly updated and the prop is correctly passed to theTransactionButton
.Also applies to: 126-126, 218-218
apps/dashboard/src/app/nebula-app/login/NebulaConnectEmbedLogin.tsx (2)
12-12
: Good use of domain-specific client instance.The import of
nebulaAppThirdwebClient
and its consistent usage ensures that the Nebula app uses its specific client configuration rather than a generic one. This is a good architectural decision.Also applies to: 19-19, 105-105, 110-110
116-116
: Proper interface update and prop usage.The
CustomConnectEmbed
component's interface is correctly updated to include theclient
prop, and it's properly passed to theConnectEmbed
component.Also applies to: 176-176
apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/webhooks/components/FilterDetailsStep.tsx (1)
25-25
: LGTM! Clean implementation of client prop injection.The changes correctly implement the systematic refactoring to replace
useThirdwebClient
hook usage with explicit prop passing. TheThirdwebClient
type is properly imported, the interface is extended appropriately, and the client is correctly threaded through to theMultiNetworkSelector
component.Also applies to: 48-48, 133-133, 178-178
apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(instance)/[engineId]/overview/components/engine-overview.tsx (1)
23-23
: LGTM! Proper client prop implementation throughout component hierarchy.The changes correctly implement the client prop injection pattern:
EngineOverviewProps
interface properly extended withclient: ThirdwebClient
- Client prop is systematically passed down through the component tree:
EngineOverview
→BackendWalletsSection
→SingleNetworkSelector
/BackendWalletsTable
- All type annotations are consistent and correct
- The refactoring maintains the existing component structure while making client dependency explicit
Also applies to: 31-31, 40-40, 48-48, 59-59, 137-137, 152-152
apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/webhooks/page.tsx (1)
8-8
: LGTM! Excellent implementation with multiple improvements.This refactoring introduces several beneficial changes:
Performance Enhancement:
Promise.all
for concurrent fetching of auth token and params improves page load timeImproved Error Handling:
- Added
notFound()
call when project or auth token is missing- Enhanced try-catch wrapper for webhook fetching operations
Code Clarity:
- Renamed
clientId
toprojectClientId
for better semantic meaning- Explicit client creation using
getClientThirdwebClient
with JWT and team IDArchitecture Consistency:
- Proper client prop threading to
WebhooksTable
andCreateWebhookModal
components- Follows the established pattern of explicit client dependency injection
The implementation maintains existing functionality while making the code more robust and consistent with the broader refactoring objectives.
Also applies to: 10-10, 21-24, 31-33, 35-35, 37-54, 56-59, 97-98, 110-111
apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(instance)/[engineId]/contract-subscriptions/components/contract-subscriptions-table.tsx (2)
58-58
: LGTM: Proper client prop addition and parameter threading.The addition of the
client: ThirdwebClient
prop to the interface and component signature follows the systematic pattern of externalizing client dependencies. The prop is correctly typed and integrated into the component.Also applies to: 72-72
89-89
: Excellent client prop forwarding throughout the component hierarchy.The
client
prop is consistently and correctly forwarded to all child components that require it:
ChainIconClient
components (lines 89, 419)ChainLastBlock
component (line 217)RemoveModal
component (line 251)ChainLastBlockTimestamp
component (line 331)This ensures proper client usage without any missing dependencies.
Also applies to: 217-217, 251-251, 331-331, 419-419
apps/dashboard/src/components/buttons/MismatchButton.tsx (3)
88-88
: LGTM: Proper client prop addition to component interface.The addition of
client: ThirdwebClient
toMistmatchButtonProps
correctly externalizes the client dependency, making it explicit rather than relying on internal hooks.
114-114
: Excellent client prop usage and forwarding.The client prop is properly used for wallet balance fetching (line 114) and correctly forwarded to child components:
NoFundsDialogContent
(line 279)PayEmbed
(line 285)This ensures consistent client usage throughout the component tree.
Also applies to: 279-279, 285-285
573-573
: Well-executed function signature update for GetLocalHostTestnetFunds.The conversion from a parameterless
React.FC
to a function component acceptingprops: { client: ThirdwebClient }
is handled correctly. The client is properly used in:
privateKeyToAccount
(line 581)prepareTransaction
(line 586)This maintains the function's behavior while externalizing the client dependency.
Also applies to: 581-581, 586-586
apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/webhooks/components/CreateWebhookModal.tsx (3)
43-43
: Excellent naming improvement and client prop addition.The renaming from
clientId
toprojectClientId
improves code clarity by clearly distinguishing between the project's client ID (string) and the actualThirdwebClient
instance. The addition of theclient: ThirdwebClient
prop follows the systematic pattern of externalizing client dependencies.Also applies to: 45-45
87-87
: Proper client prop forwarding to dependent components.The
client
prop is correctly forwarded to:
useAbiMultiFetch
for event ABI fetching (line 87)useAbiMultiFetch
for transaction ABI fetching (line 96)FilterDetailsStep
component (line 266)This ensures consistent client usage across all blockchain interactions.
Also applies to: 96-96, 266-266
131-131
: Correct usage of renamed projectClientId parameter.The renamed
projectClientId
is properly used in:
createWebhook
function call (line 131)useTestWebhook
hook (line 217)The naming change helps distinguish this string identifier from the
ThirdwebClient
instance.Also applies to: 217-217
apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(instance)/[engineId]/relayers/components/relayers-table.tsx (3)
52-52
: LGTM: Proper client prop addition to RelayersTable.The addition of
client: ThirdwebClient
to theRelayersTableProps
interface and component parameter correctly externalizes the client dependency, following the systematic pattern across the codebase.Also applies to: 63-63
80-80
: Excellent client prop forwarding throughout the component hierarchy.The
client
prop is consistently and correctly forwarded to all components that require it:
ChainIconClient
for chain icons (lines 80, 426)EditModal
andRemoveModal
for editing/removing relayers (lines 195, 204)SingleNetworkSelector
for network selection (line 299)This ensures proper client usage across all child components without any missing dependencies.
Also applies to: 195-195, 204-204, 299-299, 426-426
216-216
: Proper client parameter addition to modal components.The modal components (
EditModal
andRemoveModal
) correctly accept theclient: ThirdwebClient
parameter in their props interfaces and function signatures. This maintains consistency with the external client dependency pattern.Also applies to: 222-222, 362-362, 368-368
apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/modules/components/Royalty.tsx (4)
26-26
: LGTM: Proper import of ThirdwebClient typeThe import correctly adds the
ThirdwebClient
type needed for the prop threading refactor.
153-153
: LGTM: Client prop correctly extracted from contractThe client is properly extracted from
props.contract.client
and passed to the UI component, maintaining the dependency chain.
190-190
: LGTM: Consistent client prop threadingThe client prop is consistently threaded through all child components (
RoyaltyInfoPerTokenSection
,DefaultRoyaltyInfoSection
, andTransferValidatorSection
).Also applies to: 214-214, 238-238
356-356
: LGTM: TransactionButton components receive client propAll
TransactionButton
components now receive theclient
prop explicitly, replacing the previous implicit client access pattern.Also applies to: 462-462, 542-542
apps/dashboard/src/app/nebula-app/(app)/components/ChatPageContent.tsx (3)
14-14
: LGTM: Proper import additionThe
ThirdwebClient
type import is correctly added to support the new prop structure.
38-38
: LGTM: Component interface updated with client propThe
client: ThirdwebClient
prop is properly added to the component interface, replacing internal client creation.
347-347
: LGTM: Client prop threaded to child componentsThe client prop is consistently passed to both
Chats
andChatBar
components that require ThirdwebClient access.Also applies to: 361-361
apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/modules/components/Claimable.tsx (4)
44-44
: LGTM: Correct type importThe
ThirdwebClient
type is properly imported alongside other thirdweb imports.
275-275
: LGTM: Client extracted from contractThe client is correctly extracted from
props.contract.client
and passed to the UI component.
363-363
: LGTM: Consistent prop threading to child componentsThe client prop is systematically passed to all child components that require ThirdwebClient access.
Also applies to: 396-396, 431-431
750-750
: LGTM: TransactionButton components updatedAll
TransactionButton
instances now receive theclient
prop, completing the dependency injection chain.Also applies to: 834-834, 953-953
apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/modules/components/Mintable.tsx (4)
30-34
: LGTM: Proper import structureThe
ThirdwebClient
type is correctly added to the existing import statement from thirdweb.
184-184
: LGTM: Client prop correctly passed from contractThe client is properly extracted from
contract.client
and passed to theMintableModuleUI
component.
224-224
: LGTM: Client prop threaded to child componentsThe client prop is consistently passed to both
MintNFTSection
andPrimarySalesSection
components.Also applies to: 252-252
323-323
: LGTM: TransactionButton components receive client propBoth
TransactionButton
instances now receive theclient
prop, completing the dependency injection pattern.Also applies to: 537-537
apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(instance)/[engineId]/contract-subscriptions/components/add-contract-subscription-button.tsx (10)
34-34
: LGTM: Proper import addition for explicit client typing.The addition of
ThirdwebClient
type import aligns with the architectural change to explicit dependency injection.
47-47
: LGTM: Client prop addition improves dependency management.Adding the
client
prop to the component interface and destructuring it in the function signature makes the ThirdwebClient dependency explicit rather than relying on internal hook usage. This improves testability and makes the component's requirements clearer.Also applies to: 52-52
73-73
: LGTM: Proper client prop forwarding.The client prop is correctly passed down to the AddModal component, maintaining the dependency chain.
94-94
: LGTM: AddModal component updated for client prop passing.The component interface and destructuring are updated to accept and use the client prop, continuing the pattern of explicit dependency injection.
Also applies to: 99-99
180-180
: LGTM: Client prop forwarded to modal body components.Both ModalBodyInputContract and ModalBodyInputData receive the client prop, ensuring all child components have access to the ThirdwebClient instance.
Also applies to: 186-186
197-197
: LGTM: ModalBodyInputContract properly receives client prop.The component interface is updated to include the client prop with proper TypeScript typing.
Also applies to: 201-201
293-293
: LGTM: ModalBodyInputData properly receives client prop.The component interface is updated to include the client prop with proper TypeScript typing, maintaining consistency with the sibling component.
Also applies to: 297-297
389-389
: LGTM: Client prop passed to FilterSelector components.Both FilterSelector instances receive the client prop, enabling them to create contract instances without relying on internal hooks.
Also applies to: 446-446
483-483
: LGTM: FilterSelector component updated for explicit client usage.The component interface is properly updated to accept the ThirdwebClient prop, replacing the previous implicit dependency on useThirdwebClient hook.
Also applies to: 490-490
494-504
: LGTM: Contract instantiation now uses explicit client.The getContract call now uses the explicit
client
prop instead of relying on the useThirdwebClient hook. This change improves the component's testability and makes dependencies explicit. The dependency array correctly includes the client parameter.apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/ecosystem/[slug]/(active)/configuration/components/client/allowed-operations-section.tsx (6)
28-33
: LGTM! Clean interface update for explicit client dependency.The addition of the
client: ThirdwebClient
prop to the interface properly supports the refactoring from implicit hook usage to explicit prop passing.
35-40
: LGTM! Function signature correctly updated.The function signature properly includes the new
client
parameter, maintaining consistency with the updated interface.
165-170
: LGTM! Consistent prop threading.The
client
prop is correctly passed down to thePersonalSignRestrictions
component, maintaining the explicit dependency pattern.
452-460
: LGTM! Component signature properly updated.The
PersonalSignRestrictions
function signature correctly includes theclient
parameter with proper TypeScript typing.
531-536
: LGTM! Consistent client prop passing.The
client
prop is correctly passed to theUserOpTransactions
component, maintaining the explicit dependency pattern throughout the component tree.
578-588
: LGTM! Final component signature updated correctly.The
UserOpTransactions
function signature properly includes theclient
parameter, completing the consistent refactoring pattern across all affected components in this file.
.../(dashboard)/(chain)/[chain_id]/[contractAddress]/modules/components/OpenEditionMetadata.tsx
Show resolved
Hide resolved
Merge activity
|
<!-- ## 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 enhancing the `TransactionButton` component across various files by adding a `client` prop and other relevant properties to improve transaction handling and user interactions. ### Detailed summary - Added `client` prop to `TransactionButton` in multiple components for transaction management. - Included `isLoggedIn`, `txChainID`, and `transactionCount` props where applicable. - Enhanced user experience by managing loading states and enabling/disabling buttons based on conditions. > ✨ 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** - All transaction-related buttons and components now require and receive an explicit client instance, improving reliability and consistency across the dashboard. - **Refactor** - Updated component interfaces to accept a client prop instead of relying on internal hooks. - Standardized the way client instances are passed through component hierarchies, including in forms, modals, and tables. - Renamed certain props for clarity (e.g., `clientId` to `projectClientId`). - **Style** - No user-facing visual changes. - **Chores** - Improved code maintainability by removing internal hook usage for client access. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
759d325
to
b84db12
Compare
5fc9198
to
1c11f84
Compare
PR-Codex overview
This PR primarily focuses on adding the
client
prop to various instances of theTransactionButton
component across multiple files, enhancing the ability to manage transactions with a specific client context.Detailed summary
client
prop toTransactionButton
in numerous components to ensure transaction management is client-specific.Transferable
,deposit-native
,launch-token
, and various NFT-related components.client
prop for consistency.client
prop in buttons related to transactions and actions.Summary by CodeRabbit
clientId
toprojectClientId
).