-
Notifications
You must be signed in to change notification settings - Fork 561
Dashboard: Reduce useThirdwebClient hook usage #7223
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 #7223
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
|
WalkthroughThis update refactors numerous components to require an explicit Changes
Sequence Diagram(s)sequenceDiagram
participant ParentComponent
participant ThirdwebClient
participant ChildComponent
participant WalletAddress
ParentComponent->>ThirdwebClient: Instantiate or receive client
ParentComponent->>ChildComponent: Pass client as prop
ChildComponent->>WalletAddress: Pass client as prop
WalletAddress->>ThirdwebClient: Use client for address-related operations
Suggested reviewers
Warning Review ran into problems🔥 ProblemsErrors were encountered while retrieving linked issues. Errors (1)
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (56)
✅ Files skipped from review due to trivial changes (2)
🚧 Files skipped from review as they are similar to previous changes (54)
⏰ Context from checks skipped due to timeout of 90000ms (8)
✨ 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. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #7223 +/- ##
=======================================
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 📦
|
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: 2
🧹 Nitpick comments (1)
apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/cloud/server-wallets/page.tsx (1)
66-66
: LGTM: Client prop propagationThe client instance is properly passed to the
ServerWalletsTable
component, completing the prop drilling chain from page level to components that need the client.Consider implementing a context provider pattern if the prop drilling becomes too deep across multiple component levels. This could help reduce boilerplate while maintaining explicit client dependencies.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (56)
apps/dashboard/src/@/components/blocks/wallet-address.tsx
(4 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]/account-permissions/components/account-signer.tsx
(3 hunks)apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/account-permissions/components/account-signers.tsx
(1 hunks)apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/modules/components/BatchMetadata.tsx
(1 hunks)apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/modules/components/Claimable.tsx
(1 hunks)apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/modules/components/Mintable.tsx
(1 hunks)apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/modules/components/OpenEditionMetadata.tsx
(1 hunks)apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/modules/components/Royalty.tsx
(1 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/batchMetadata.stories.tsx
(1 hunks)apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/modules/components/claimable.stories.tsx
(1 hunks)apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/modules/components/mintable.stories.tsx
(3 hunks)apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/modules/components/module-card.stories.tsx
(3 hunks)apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/modules/components/module-card.tsx
(3 hunks)apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/modules/components/module-instance.tsx
(2 hunks)apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/modules/components/openEditionMetadata.stories.tsx
(1 hunks)apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/modules/components/royalty.stories.tsx
(3 hunks)apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/modules/components/transferable.stories.tsx
(3 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
(2 hunks)apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/overview/components/MarketplaceDetails.tsx
(6 hunks)apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/overview/components/PermissionsTable.tsx
(4 hunks)apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/public-pages/erc20/_components/RecentTransfers.tsx
(4 hunks)apps/dashboard/src/app/(app)/account/wallets/LinkWalletUI.tsx
(5 hunks)apps/dashboard/src/app/(app)/account/wallets/LinkWalletsUI.stories.tsx
(4 hunks)apps/dashboard/src/app/(app)/account/wallets/page.tsx
(2 hunks)apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/usage/overview/components/SponsoredTransactionsTableUI.tsx
(1 hunks)apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/connect/in-app-wallets/users/page.tsx
(2 hunks)apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/connect/universal-bridge/page.tsx
(5 hunks)apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/cloud/analytics/analytics-page.tsx
(3 hunks)apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/cloud/analytics/send-test-tx.client.tsx
(2 hunks)apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/cloud/analytics/tx-table/tx-table-ui.tsx
(3 hunks)apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/cloud/analytics/tx-table/tx-table.tsx
(3 hunks)apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/cloud/page.tsx
(3 hunks)apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/cloud/server-wallets/page.tsx
(3 hunks)apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/cloud/server-wallets/wallet-table/wallet-table-ui.client.tsx
(6 hunks)apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/cloud/server-wallets/wallet-table/wallet-table.tsx
(4 hunks)apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/cloud/tx/[id]/page.tsx
(4 hunks)apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/cloud/tx/[id]/transaction-details-ui.tsx
(4 hunks)apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(instance)/[engineId]/access-tokens/components/access-tokens-table.tsx
(2 hunks)apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(instance)/[engineId]/access-tokens/components/engine-access-tokens.tsx
(5 hunks)apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(instance)/[engineId]/access-tokens/page.tsx
(1 hunks)apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(instance)/[engineId]/admins/components/admins-table.tsx
(2 hunks)apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(instance)/[engineId]/admins/components/engine-admins.tsx
(2 hunks)apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(instance)/[engineId]/admins/page.tsx
(1 hunks)apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(instance)/[engineId]/overview/components/backend-wallets-table.tsx
(10 hunks)apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(instance)/[engineId]/overview/components/transaction-timeline.tsx
(6 hunks)apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(instance)/[engineId]/overview/components/transactions-table.tsx
(2 hunks)apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/_utils/getEngineInstancePageMeta.ts
(3 hunks)apps/dashboard/src/app/nebula-app/(app)/components/ExecuteTransactionCard.tsx
(2 hunks)apps/dashboard/src/components/embedded-wallets/Users/index.tsx
(4 hunks)apps/dashboard/src/components/pay/PayAnalytics/PayAnalytics.tsx
(3 hunks)apps/dashboard/src/components/pay/PayAnalytics/components/PayCustomersTable.tsx
(5 hunks)apps/dashboard/src/components/pay/PayAnalytics/components/PaymentHistory.tsx
(5 hunks)
🧰 Additional context used
🧬 Code Graph Analysis (32)
apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/nfts/[tokenId]/token-id.tsx (1)
packages/engine/src/client/client.gen.ts (1)
client
(24-28)
apps/dashboard/src/app/(app)/account/wallets/LinkWalletsUI.stories.tsx (1)
apps/dashboard/src/stories/utils.tsx (1)
storybookThirdwebClient
(47-50)
apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/modules/components/openEditionMetadata.stories.tsx (1)
apps/dashboard/src/stories/utils.tsx (1)
storybookThirdwebClient
(47-50)
apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/modules/components/batchMetadata.stories.tsx (1)
apps/dashboard/src/stories/utils.tsx (1)
storybookThirdwebClient
(47-50)
apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/(marketplace)/components/listing-drawer.tsx (1)
apps/dashboard/src/@/components/blocks/wallet-address.tsx (1)
WalletAddress
(21-166)
apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/modules/components/mintable.stories.tsx (1)
apps/dashboard/src/stories/utils.tsx (1)
storybookThirdwebClient
(47-50)
apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/modules/components/royalty.stories.tsx (2)
apps/dashboard/src/stories/utils.tsx (1)
storybookThirdwebClient
(47-50)apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/modules/components/Royalty.tsx (1)
RoyaltyModuleUI
(158-251)
apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/modules/components/claimable.stories.tsx (1)
apps/dashboard/src/stories/utils.tsx (1)
storybookThirdwebClient
(47-50)
apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/modules/components/transferable.stories.tsx (1)
apps/dashboard/src/stories/utils.tsx (1)
storybookThirdwebClient
(47-50)
apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/cloud/analytics/tx-table/tx-table-ui.tsx (2)
packages/thirdweb/src/exports/thirdweb.ts (1)
ThirdwebClient
(26-26)apps/dashboard/src/@/components/blocks/wallet-address.tsx (1)
WalletAddress
(21-166)
apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(instance)/[engineId]/admins/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]/admins/components/engine-admins.tsx (1)
EngineAdmins
(15-52)packages/engine/src/client/client.gen.ts (1)
client
(24-28)
apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/modules/components/module-card.tsx (2)
packages/thirdweb/src/exports/thirdweb.ts (1)
ThirdwebClient
(26-26)apps/dashboard/src/@/components/blocks/wallet-address.tsx (1)
WalletAddress
(21-166)
apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/nfts/components/table.tsx (1)
apps/dashboard/src/@/components/blocks/wallet-address.tsx (1)
WalletAddress
(21-166)
apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(instance)/[engineId]/access-tokens/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]/access-tokens/components/engine-access-tokens.tsx (1)
EngineAccessTokens
(27-87)packages/engine/src/client/client.gen.ts (1)
client
(24-28)
apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/usage/overview/components/SponsoredTransactionsTableUI.tsx (1)
apps/dashboard/src/@/components/blocks/wallet-address.tsx (1)
WalletAddress
(21-166)
apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/cloud/server-wallets/page.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)/team/[team_slug]/[project_slug]/(sidebar)/engine/cloud/analytics/send-test-tx.client.tsx (1)
apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/cloud/server-wallets/wallet-table/wallet-table-ui.client.tsx (1)
SmartAccountCell
(199-237)
apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/overview/components/MarketplaceDetails.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/components/pay/PayAnalytics/components/PayCustomersTable.tsx (2)
packages/thirdweb/src/exports/thirdweb.ts (1)
ThirdwebClient
(26-26)apps/dashboard/src/@/components/blocks/wallet-address.tsx (1)
WalletAddress
(21-166)
apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/(marketplace)/components/marketplace-table.tsx (1)
apps/dashboard/src/@/components/blocks/wallet-address.tsx (1)
WalletAddress
(21-166)
apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(instance)/[engineId]/access-tokens/components/engine-access-tokens.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)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(instance)/[engineId]/admins/components/admins-table.tsx (2)
apps/dashboard/src/@3rdweb-sdk/react/hooks/useEngine.ts (1)
EngineAdmin
(472-476)apps/dashboard/src/@/components/blocks/wallet-address.tsx (1)
WalletAddress
(21-166)
apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/modules/components/module-card.stories.tsx (2)
apps/dashboard/src/stories/utils.tsx (1)
storybookThirdwebClient
(47-50)apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/modules/components/module-card.tsx (1)
ModuleCardUI
(206-325)
apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/_utils/getEngineInstancePageMeta.ts (4)
apps/dashboard/src/app/(app)/api/lib/getAuthToken.ts (1)
getAuthToken
(6-14)apps/dashboard/src/app/(app)/account/settings/getAccount.ts (1)
getValidAccount
(44-53)apps/dashboard/src/@/api/team.ts (1)
getTeamBySlug
(11-30)apps/dashboard/src/@/constants/thirdweb-client.client.ts (1)
getClientThirdwebClient
(3-11)
apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/cloud/tx/[id]/transaction-details-ui.tsx (2)
packages/thirdweb/src/exports/thirdweb.ts (1)
ThirdwebClient
(26-26)apps/dashboard/src/@/components/blocks/wallet-address.tsx (1)
WalletAddress
(21-166)
apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/modules/components/module-instance.tsx (1)
apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/modules/components/module-card.tsx (1)
ModuleCardUI
(206-325)
apps/dashboard/src/components/pay/PayAnalytics/PayAnalytics.tsx (3)
packages/thirdweb/src/exports/thirdweb.ts (1)
ThirdwebClient
(26-26)apps/dashboard/src/components/pay/PayAnalytics/components/PayCustomersTable.tsx (1)
PayCustomersTable
(22-81)apps/dashboard/src/components/pay/PayAnalytics/components/PaymentHistory.tsx (1)
PaymentHistory
(27-123)
apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(instance)/[engineId]/overview/components/transaction-timeline.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/components/pay/PayAnalytics/components/PaymentHistory.tsx (3)
packages/thirdweb/src/exports/thirdweb.ts (1)
ThirdwebClient
(26-26)apps/dashboard/src/@/api/universal-bridge/developer.ts (3)
PaymentsResponse
(168-173)getPayments
(207-250)Payment
(174-205)apps/dashboard/src/@/components/blocks/wallet-address.tsx (1)
WalletAddress
(21-166)
apps/dashboard/src/app/(app)/account/wallets/LinkWalletUI.tsx (2)
apps/dashboard/src/@/api/linked-wallets.ts (1)
LinkedWallet
(4-8)packages/thirdweb/src/exports/thirdweb.ts (1)
ThirdwebClient
(26-26)
apps/dashboard/src/components/embedded-wallets/Users/index.tsx (2)
packages/thirdweb/src/exports/thirdweb.ts (1)
ThirdwebClient
(26-26)apps/dashboard/src/@/components/blocks/wallet-address.tsx (1)
WalletAddress
(21-166)
apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/cloud/server-wallets/wallet-table/wallet-table-ui.client.tsx (3)
packages/thirdweb/src/exports/thirdweb.ts (1)
ThirdwebClient
(26-26)apps/dashboard/src/@/components/blocks/wallet-address.tsx (1)
WalletAddress
(21-166)packages/engine/src/client/client.gen.ts (1)
client
(24-28)
⏰ Context from checks skipped due to timeout of 90000ms (2)
- GitHub Check: Size
- GitHub Check: Analyze (javascript)
🔇 Additional comments (128)
apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/modules/components/batchMetadata.stories.tsx (1)
90-90
: LGTM! Consistent client prop addition for Storybook testing.The addition of the
client
prop usingstorybookThirdwebClient
aligns perfectly with the PR objective of reducinguseThirdwebClient
hook usage. This ensures the component has direct access to the ThirdwebClient instance in the Storybook environment.apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/modules/components/openEditionMetadata.stories.tsx (1)
87-87
: LGTM! Consistent implementation of client prop pattern.The addition of
client={storybookThirdwebClient}
follows the same pattern as other story files in this refactoring effort. This provides the component with direct access to the ThirdwebClient instance, eliminating the need for internal hook usage.apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/account-permissions/components/account-signers.tsx (1)
43-43
: LGTM! Consistent client prop propagation to child components.The addition of
client={contract.client}
properly passes the ThirdwebClient instance to eachAccountSigner
component. This aligns with the refactoring effort to provide direct client access throughout the component tree, replacing internal hook usage with explicit prop passing.apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/modules/components/OpenEditionMetadata.tsx (1)
76-76
: LGTM! Consistent client prop implementation.The addition of the
client
prop follows the established pattern across the codebase for passing theThirdwebClient
instance explicitly to UI components. This promotes better dependency management and reduces reliance on internal hooks.apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/cloud/page.tsx (3)
3-3
: LGTM! Proper import for client creation.The import of
getClientThirdwebClient
is necessary for creating the authenticated client instance.
81-84
: LGTM! Correct client instantiation.The client is properly created with the required authentication context (JWT token and team ID), which ensures proper access control for the analytics functionality.
110-110
: LGTM! Consistent client prop passing.The client instance is correctly passed as a prop to the
TransactionsAnalyticsPageContent
component, following the established pattern for explicit client dependency management.apps/dashboard/src/app/nebula-app/(app)/components/ExecuteTransactionCard.tsx (2)
72-72
: LGTM! Consistent client prop for WalletAddress component.The addition of the
client
prop to the "From" WalletAddress component follows the established pattern for passingThirdwebClient
instances explicitly.
88-88
: LGTM! Consistent client prop for WalletAddress component.The addition of the
client
prop to the "To" WalletAddress component maintains consistency with the pattern applied across the codebase.apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/modules/components/Claimable.tsx (1)
274-274
: LGTM! Consistent client prop implementation for module UI.The addition of the
client
prop toClaimableModuleUI
follows the established pattern across module components, ensuring consistent access to theThirdwebClient
instance throughout the component hierarchy.apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/modules/components/Mintable.tsx (1)
180-180
: LGTM! Client prop correctly passed to MintableModuleUI.This change follows the consistent pattern of explicitly passing the
ThirdwebClient
instance from the contract object to the UI component, reducing reliance on theuseThirdwebClient
hook as intended by the PR objectives.apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/(marketplace)/components/listing-drawer.tsx (1)
95-98
: LGTM! WalletAddress component correctly updated with required client prop.The
WalletAddress
component now requires an explicitclient
prop instead of using theuseThirdwebClient
hook internally. This change correctly passes theThirdwebClient
instance from the contract object, which aligns with the refactoring pattern throughout the codebase.apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/modules/components/Transferable.tsx (1)
126-126
: LGTM! Client prop correctly passed to TransferableModuleUI.This change maintains consistency with the refactoring pattern by explicitly passing the
ThirdwebClient
instance fromprops.contract.client
to the UI component, reducing dependency on internal hooks.apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/modules/components/mintable.stories.tsx (1)
109-109
: LGTM! Storybook stories correctly updated with client prop.All three instances of
MintableModuleUI
in the storybook stories are consistently updated to include the requiredclient
prop usingstorybookThirdwebClient
. This ensures the stories continue to work correctly with the refactored component that now requires explicit client injection.Also applies to: 130-130, 151-151
apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/nfts/[tokenId]/token-id.tsx (1)
228-228
: Excellent refactor: Client prop properly passed to WalletAddress.This change correctly passes the
client
instance to theWalletAddress
component, aligning with the architectural improvement to reduceuseThirdwebClient
hook usage. The client is properly obtained from the hook at the component level and passed down explicitly.apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/modules/components/royalty.stories.tsx (1)
86-86
: Consistent storybook client prop implementation.All instances of
RoyaltyModuleUI
have been properly updated to receive thestorybookThirdwebClient
prop. This ensures consistent client context across all story variants and aligns with the broader refactor to explicitly pass ThirdwebClient instances.Also applies to: 119-119, 125-125, 160-160
apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/modules/components/module-card.stories.tsx (2)
5-5
: Import addition for storybook client.Good addition of the
storybookThirdwebClient
import to support the client prop requirements.
67-67
: Systematic client prop addition to ModuleCardUI instances.All
ModuleCardUI
components have been consistently updated to receive thestorybookThirdwebClient
prop. This maintains consistency across story variants and supports the architectural refactor to explicit client passing.Also applies to: 80-80, 98-98
apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/modules/components/Royalty.tsx (1)
153-153
: Proper client forwarding from contract to UI component.The client is correctly passed from
props.contract.client
to theRoyaltyModuleUI
component. This establishes the proper client context for UI components that need access to the ThirdwebClient instance, completing the dependency chain from contract to UI.apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/modules/components/claimable.stories.tsx (1)
150-150
: LGTM! Client prop correctly added to storybook configuration.The addition of
client={storybookThirdwebClient}
prop toClaimableModuleUI
aligns perfectly with the broader refactoring effort to makeThirdwebClient
dependencies explicit. ThestorybookThirdwebClient
is properly imported and configured for the storybook environment.apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(instance)/[engineId]/overview/components/transactions-table.tsx (2)
237-241
: LGTM! Client prop correctly passed to WalletAddress component.The
WalletAddress
component now receives theclient
prop explicitly, which aligns with the refactoring effort to makeThirdwebClient
dependencies explicit rather than relying on internal hooks.
731-731
: LGTM! Client prop correctly passed to TransactionTimeline component.The
TransactionTimeline
component now receives theclient
prop, maintaining consistency with the broader pattern of explicit client dependency injection throughout the codebase.apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/cloud/analytics/send-test-tx.client.tsx (2)
201-204
: LGTM! Client prop correctly added to SmartAccountCell in SelectValue.The
SmartAccountCell
component now receives theclient={thirdwebClient}
prop for the currently selected wallet display, which is consistent with the refactoring effort to make client dependencies explicit.
215-218
: LGTM! Client prop correctly added to SmartAccountCell in dropdown options.The
SmartAccountCell
component now receives theclient={thirdwebClient}
prop for each wallet option in the dropdown, ensuring consistent client context across all wallet address renderings.apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(instance)/[engineId]/admins/page.tsx (2)
7-7
: LGTM! Client correctly destructured from engineInstancePageHandler.The
client
is now properly extracted from theengineInstancePageHandler
result, which creates theThirdwebClient
instance using the JWT token and team ID as shown in the relevant code snippets.
13-19
: LGTM! Client prop correctly passed to EngineAdmins component.The
EngineAdmins
component now receives theclient
prop, completing the dependency injection pattern. This aligns with the component's interface as shown in the relevant code snippets where it accepts and uses the client prop.apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(instance)/[engineId]/access-tokens/page.tsx (2)
7-7
: LGTM! Correct destructuring of the client prop.The destructuring correctly extracts the
client
property that is now returned byengineInstancePageHandler
as confirmed by the relevant code snippets.
14-18
: LGTM! Proper client prop forwarding.The
client
prop is correctly passed to theEngineAccessTokens
component, which aligns with the refactor to reduceuseThirdwebClient
hook usage throughout the dashboard.apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/modules/components/transferable.stories.tsx (3)
82-82
: LGTM! Correct client prop addition for storybook.The
storybookThirdwebClient
is appropriately used for the firstTransferableModuleUI
instance in the stories.
101-101
: LGTM! Consistent client prop usage.The client prop is correctly added to the second
TransferableModuleUI
instance, maintaining consistency across all story variants.
131-131
: LGTM! Complete client prop implementation.The third and final
TransferableModuleUI
instance correctly receives the client prop, completing the storybook refactor for this component.apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/cloud/analytics/tx-table/tx-table-ui.tsx (3)
41-41
: LGTM! Correct type import.The
ThirdwebClient
type import is necessary for the new client prop and follows the standard import pattern.
55-55
: LGTM! Proper component interface update.The
client: ThirdwebClient
prop is correctly added to the component props interface, enabling explicit client instance passing.
169-176
: LGTM! Correct client prop forwarding to WalletAddress.The
WalletAddress
component now correctly receives theclient
prop as required by its updated interface. The conditional rendering logic for the "From Address" cell is preserved appropriately.apps/dashboard/src/app/(app)/account/wallets/LinkWalletsUI.stories.tsx (4)
3-7
: LGTM! Correct import expansion.The import statement is properly expanded to include
storybookThirdwebClient
alongside the existing imports, maintaining clean organization.
79-79
: LGTM! Correct client prop addition.The first
LinkWalletUI
instance correctly receives thestorybookThirdwebClient
as the client prop.
88-88
: LGTM! Consistent client prop usage.The second
LinkWalletUI
instance maintains consistency by also receiving the client prop.
97-97
: LGTM! Complete storybook refactor.The third
LinkWalletUI
instance completes the storybook refactor by receiving the client prop, ensuring all story variants are updated consistently.apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/modules/components/module-card.tsx (3)
25-25
: LGTM: Correct import additionThe
ThirdwebClient
type import is properly added to support the new client prop requirement.
184-184
: LGTM: Proper interface extensionThe
client: ThirdwebClient
prop is correctly added toModuleCardUIProps
interface, maintaining type safety.
254-257
: LGTM: Correct client prop propagationThe
WalletAddress
component now correctly receives theclient
prop, aligning with the refactor to removeuseThirdwebClient
hook usage.apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/account-permissions/components/account-signer.tsx (2)
6-6
: LGTM: Consistent prop drilling implementationThe changes correctly implement the client prop pattern:
- Proper type import for
ThirdwebClient
- Interface extension with required
client
prop- Component parameter destructuring includes the new prop
Also applies to: 20-20, 26-26
49-53
: LGTM: Correct WalletAddress prop updateThe
WalletAddress
component now receives theclient
prop, properly following the refactor pattern to eliminateuseThirdwebClient
hook dependency.apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/cloud/analytics/analytics-page.tsx (2)
3-3
: LGTM: Proper type import and prop additionThe
ThirdwebClient
type is correctly imported and added to the component props, maintaining type safety in the prop drilling pattern.Also applies to: 19-19
41-41
: LGTM: Correct prop propagation to child componentThe
client
prop is properly passed to theTransactionsTable
component, continuing the explicit client propagation pattern.apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/cloud/server-wallets/page.tsx (2)
5-5
: LGTM: Correct utility importThe
getClientThirdwebClient
import is properly added to support creating the authenticated client instance.
29-32
: LGTM: Proper client instantiationThe client is correctly created using the authenticated token and team ID from the project context, ensuring proper authentication for downstream components.
apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/nfts/components/table.tsx (2)
136-136
: LGTM! Correctly passes client prop to WalletAddress.The addition of
client={contract.client}
prop to theWalletAddress
component is correct and aligns with the component's updated interface that requires an explicitThirdwebClient
instance.
156-156
: Good dependency management in useMemo.Adding
contract.client
to the dependency array ensures the table columns are properly re-memoized when the client instance changes, preventing potential stale closures.apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/connect/in-app-wallets/users/page.tsx (1)
34-39
: Good prop updates for explicit client passing.The changes correctly:
- Pass the
client
instance to enable explicit ThirdwebClient usage- Rename
clientId
toprojectClientId
for better naming consistency- Maintain all existing props while adding the new client dependency
apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/cloud/analytics/tx-table/tx-table.tsx (1)
5-5
: Clean implementation of client prop threading.The changes correctly implement the explicit client prop pattern:
- Added proper TypeScript import for
ThirdwebClient
- Updated component interface to require the
client
prop- Cleanly passed the prop through to the child component
This follows the established pattern of explicit dependency injection rather than relying on internal hooks.
Also applies to: 14-14, 27-27
apps/dashboard/src/app/(app)/account/wallets/page.tsx (3)
15-22
: Good authentication flow with proper redirect handling.The authentication check and client creation are well implemented:
- Proper redirect to login if auth token is missing
- Client creation with
teamId: undefined
is appropriate for account-level operations- Clean error handling flow
38-38
: Correct client prop addition to LinkWallet.The
client
prop is properly passed to theLinkWallet
component, enabling it to have explicit access to the ThirdwebClient instance for wallet-related operations.
9-13
:✅ Verification successful
Verify the getValidAccount parameter change.
The addition of the route parameter
"/account/wallets"
togetValidAccount
appears to be a change in the function signature. Please ensure this parameter is expected by the function.
🏁 Script executed:
#!/bin/bash # Check the getValidAccount function signature ast-grep --pattern 'export function getValidAccount($$$) { $$$ }'Length of output: 945
Verified getValidAccount Parameter Usage
The
getValidAccount
function in
apps/dashboard/src/app/(app)/account/settings/getAccount.ts
is defined as:export async function getValidAccount(pagePath?: string) { … }so supplying
"/account/wallets"
is supported and correct.apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/overview/components/MarketplaceDetails.tsx (4)
10-14
: LGTM: Proper import of ThirdwebClient typeThe import correctly adds the
ThirdwebClient
type from the thirdweb package, which is needed for the new prop interface.
127-127
: LGTM: Correct client prop forwardingBoth
ListingCards
components correctly receive theclient
prop fromcontract.client
, which is the standard way to access the ThirdwebClient instance from a ThirdwebContract.Also applies to: 201-201
302-303
: LGTM: Proper interface updateThe
ListingCardsProps
interface correctly adds the requiredclient
prop of typeThirdwebClient
.
405-405
: LGTM: WalletAddress component receives client propThe
WalletAddress
component now correctly receives theclient
prop, which aligns with the broader refactor whereWalletAddress
requires an explicit client instead of using internal hooks.apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/usage/overview/components/SponsoredTransactionsTableUI.tsx (1)
160-163
: LGTM: Client prop correctly forwarded to WalletAddressThe
WalletAddress
component now receives theclient
prop from the parent component's props, which is consistent with the refactor to make ThirdwebClient explicit rather than using internal hooks.apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(instance)/[engineId]/access-tokens/components/engine-access-tokens.tsx (4)
12-12
: LGTM: Proper ThirdwebClient importThe import correctly adds the
ThirdwebClient
type needed for the component interfaces.
22-23
: LGTM: Interface and function parameter updatesThe
EngineAccessTokensProps
interface and function signature correctly add theclient
prop of typeThirdwebClient
.Also applies to: 29-30
77-78
: LGTM: Proper client prop forwarding through component hierarchyThe
client
prop is correctly passed fromEngineAccessTokens
toStandardAccessTokensPanel
and properly added to the function signature.Also applies to: 92-96
118-119
: LGTM: Client forwarded to AccessTokensTableThe
client
prop is correctly passed toAccessTokensTable
, which will use it for rendering wallet addresses with the explicit ThirdwebClient instance.apps/dashboard/src/components/pay/PayAnalytics/components/PayCustomersTable.tsx (4)
7-7
: LGTM: Proper ThirdwebClient importThe import correctly adds the
ThirdwebClient
type from the thirdweb package.
24-25
: LGTM: Component props interface updated correctlyThe
PayCustomersTable
props interface correctly adds the requiredclient
prop of typeThirdwebClient
.
67-68
: LGTM: Client prop correctly threaded through component hierarchyThe
client
prop is properly passed fromPayCustomersTable
toCustomerTableRow
and correctly added to the function signature.Also applies to: 88-89
103-103
: LGTM: WalletAddress receives client propThe
WalletAddress
component now correctly receives theclient
prop, completing the prop threading chain and enabling client-aware wallet address rendering.apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/connect/universal-bridge/page.tsx (5)
3-3
: LGTM: Good imports for authentication and client creation.The imports are correctly added for the new authentication flow and client instantiation functionality.
Also applies to: 13-14
27-27
: Good performance improvement with concurrent fetching.Using
Promise.all
to fetch both params and authToken concurrently is an excellent optimization that reduces the overall response time.
31-35
: Authentication enforcement looks correct.The authentication check properly redirects to login if no auth token is present, maintaining the current path for redirect after login.
49-52
: Client instantiation follows the expected pattern.The ThirdwebClient is correctly created with the JWT token and team ID, which aligns with the refactor objectives.
69-70
:✅ Verification successful
Verify PayAnalytics component accepts these prop changes.
The prop name change from
clientId
toprojectClientId
and the addition of theclient
prop need to be verified against the PayAnalytics component interface.
🏁 Script executed:
#!/bin/bash # Description: Verify PayAnalytics component accepts the new props structure # Expected: PayAnalytics should accept projectClientId and client props ast-grep --pattern $'interface $_ { $$$ projectClientId: $_ $$$ client: $_ $$$ }' ast-grep --pattern $'type $_ = { $$$ projectClientId: $_ $$$ client: $_ $$$ }'Length of output: 182
🏁 Script executed:
#!/bin/bash # Locate PayAnalytics component definitions echo "=== PayAnalytics component definitions ===" rg -n "export (default )?(function|const|class) PayAnalytics" . # Locate any interface or type declarations for PayAnalytics props echo -e "\n=== PayAnalytics props interface/type declarations ===" rg -n "interface.*PayAnalytics" . rg -n "type.*PayAnalytics" .Length of output: 477
🏁 Script executed:
#!/bin/bash # Search for any references to PayAnalytics in the codebase echo "=== All occurrences of 'PayAnalytics' ===" rg -n "PayAnalytics" . # Locate files named PayAnalytics.tsx or containing PayAnalytics in filename echo -e "\n=== Files matching PayAnalytics*.tsx ===" fd --type f PayAnalytics --extension tsx # Search for default or named exports of PayAnalytics echo -e "\n=== Export statements for PayAnalytics ===" rg -n "export .*PayAnalytics" .Length of output: 1681
🏁 Script executed:
#!/bin/bash # Display the PayAnalytics component signature and props definition rg -n "export async function PayAnalytics" -A 20 apps/dashboard/src/components/pay/PayAnalytics/PayAnalytics.tsxLength of output: 716
PayAnalytics props signature is correct
The
PayAnalytics
component’s props include bothprojectClientId: string
andclient: ThirdwebClient
, matching the usage inpage.tsx
. No changes are needed.apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/cloud/tx/[id]/page.tsx (5)
2-2
: LGTM: Consistent imports for the refactor pattern.The imports follow the same pattern as other files in this refactor, supporting authentication and client creation.
Also applies to: 4-5
16-19
: Good concurrent data fetching optimization.Using
Promise.all
to fetch authToken and project data concurrently improves performance by reducing sequential wait time.
21-23
: Authentication flow correctly implemented.The authentication check and redirect pattern is consistent with the other files and properly maintains the current path.
35-38
: Client instantiation follows established pattern.The ThirdwebClient creation with JWT and team ID is consistent with the refactor approach.
49-49
:✅ Verification successful
Verify TransactionDetailsUI accepts client prop.
Need to confirm that the TransactionDetailsUI component has been updated to accept the new
client
prop.
🏁 Script executed:
#!/bin/bash # Description: Verify TransactionDetailsUI component accepts client prop # Expected: TransactionDetailsUI should have client prop in its interface ast-grep --pattern $'interface $_ { $$$ client: ThirdwebClient $$$ }' # Also check for type definitions ast-grep --pattern $'type $_ = { $$$ client: ThirdwebClient $$$ }'Length of output: 68847
I’ll locate the
TransactionDetailsUI
definition and its props interface:
🏁 Script executed:
#!/bin/bash # Find where TransactionDetailsUI is defined rg -n "TransactionDetailsUI" . # Look specifically for its props interface rg -n "TransactionDetailsUIProps" .Length of output: 533
🏁 Script executed:
#!/bin/bash # Display the beginning of the TransactionDetailsUI file to inspect its props sed -n '1,200p' "apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/cloud/tx/[id]/transaction-details-ui.tsx"Length of output: 7663
TransactionDetailsUI accepts
client
prop
Confirmed thatTransactionDetailsUI
’s props signature includesclient: ThirdwebClient
. No further changes needed.apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(instance)/[engineId]/admins/components/engine-admins.tsx (3)
4-4
: LGTM: Correct type import.The ThirdwebClient type import is necessary for the new prop definition.
12-12
: Good prop interface and parameter updates.The addition of the
client
prop to both the interface and component parameters is consistent with the refactor pattern.Also applies to: 18-18
47-47
:✅ Verification successful
Verify AdminsTable accepts client prop.
Need to confirm that the AdminsTable component has been updated to accept and use the
client
prop.
🏁 Script executed:
#!/bin/bash # Description: Verify AdminsTable component accepts client prop # Expected: AdminsTable should accept client prop and pass it to WalletAddress ast-grep --pattern $'interface $_ { $$$ client: ThirdwebClient $$$ }' # Check for WalletAddress usage with client prop rg -A 3 -B 3 "WalletAddress.*client"Length of output: 31753
AdminsTable now accepts and forwards the
client
prop
Verified that inapps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(instance)/[engineId]/admins/components/admins-table.tsx
theAdminsTableProps
interface includesclient: ThirdwebClient
, and eachWalletAddress
cell is rendered withclient={client}
.apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(instance)/[engineId]/access-tokens/components/access-tokens-table.tsx (4)
26-27
: LGTM: Correct imports for the refactor.The
useMemo
import andThirdwebClient
type are necessary for the component changes.
37-37
: Good prop interface and parameter updates.The addition of the
client
prop follows the established pattern for this refactor.Also applies to: 48-48
54-93
: Excellent use of useMemo for performance optimization.Moving the columns definition inside the component and memoizing it with the
client
dependency is the correct approach. This ensures the columns are only recreated when the client changes, while allowing theWalletAddress
component to receive the client prop.
78-78
:✅ Verification successful
Verify WalletAddress component accepts client prop.
Need to confirm that the WalletAddress component has been updated to accept the
client
prop as part of this refactor.
🏁 Script executed:
#!/bin/bash # Description: Verify WalletAddress component accepts client prop # Expected: WalletAddress should accept client: ThirdwebClient prop ast-grep --pattern $'interface $_ { $$$ client: ThirdwebClient $$$ }' # Check WalletAddress component definition rg -A 10 -B 5 "export.*WalletAddress"Length of output: 29634
WalletAddress component correctly accepts the
client
propConfirmed that in
apps/dashboard/src/@/components/blocks/wallet-address.tsx
, theWalletAddress
function signature includes aclient: ThirdwebClient
prop:export function WalletAddress(props: { address: string | undefined; shortenAddress?: boolean; className?: string; iconClassName?: string; client: ThirdwebClient; }) { … }No further changes required.
apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/(marketplace)/components/marketplace-table.tsx (1)
92-135
: LGTM! Excellent refactor to support explicit client dependency injection.The change correctly moves the static
tableColumns
array inside the component usinguseMemo
withcontract.client
as a dependency. This ensures proper re-rendering when the client changes and allows theWalletAddress
component to receive the requiredclient
prop.The pattern follows best practices:
- Proper memoization to prevent unnecessary re-renders
- Correct dependency array with
contract.client
- Maintains all existing column functionality
- Consistent with the broader refactor across the codebase
apps/dashboard/src/@/components/blocks/wallet-address.tsx (2)
26-26
: LGTM! Clean dependency injection refactor.Adding the required
client: ThirdwebClient
prop removes the internal dependency onuseThirdwebClient
hook, making the component's dependencies explicit and improving testability and reusability.
42-42
: LGTM! Consistent client prop usage throughout the component.All internal usages of the ThirdwebClient have been correctly updated to use
props.client
:
- Line 42:
useSocialProfiles
hook- Line 80:
WalletAvatar
component prop- Line 124:
resolveSchemeWithErrorHandler
functionThis ensures consistent client context throughout the component and its children.
Also applies to: 80-80, 124-124
apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(instance)/[engineId]/admins/components/admins-table.tsx (3)
27-28
: LGTM! Proper imports for the refactor.The addition of
useMemo
import andThirdwebClient
type import are necessary for the column memoization pattern and type safety.
37-37
: LGTM! Clean interface extension and parameter addition.The
client: ThirdwebClient
prop has been correctly added to theAdminsTableProps
interface and component parameters, maintaining type safety and enabling the dependency injection pattern.Also applies to: 48-48
54-80
: LGTM! Excellent memoization pattern for table columns.The static
columns
array has been correctly moved inside the component usinguseMemo
withclient
as a dependency. This ensures:
- Proper re-rendering when client changes
- Access to the client prop for the
WalletAddress
component (line 60)- Optimal performance by preventing unnecessary column recreations
The pattern is consistent with similar changes in other table components throughout the codebase.
apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/overview/components/PermissionsTable.tsx (3)
20-24
: LGTM! Clean import extension.The
ThirdwebClient
type has been properly added to the existing import statement from the thirdweb package, maintaining clean import organization.
72-72
: LGTM! Correct client prop propagation.The
contract.client
is properly passed down to thePermissionsTableUI
component, ensuring the ThirdwebClient instance is available for wallet address rendering.
82-82
: LGTM! Complete client prop chain implementation.The changes correctly implement the client prop chain:
- Line 82:
PermissionsTableUI
interface extended withclient: ThirdwebClient
- Line 115:
WalletAddress
component receives the requiredclient
propThis ensures proper dependency injection throughout the component hierarchy.
Also applies to: 115-115
apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(instance)/[engineId]/overview/components/transaction-timeline.tsx (2)
25-25
: Clean type import and prop additions.The
ThirdwebClient
import and prop type additions are well-implemented and consistent with the broader refactor to make client dependencies explicit.Also applies to: 40-40, 44-44
61-61
: Excellent prop threading throughout the component hierarchy.The
client
prop is properly passed fromTransactionTimeline
→CancelTransactionButton
→WalletAddress
, ensuring consistent access to theThirdwebClient
instance throughout the component tree.Also applies to: 82-82, 191-191, 256-256
apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/public-pages/erc20/_components/RecentTransfers.tsx (3)
22-22
: Clean type import and prop addition.The
ThirdwebClient
import and prop type addition follow the established pattern for the refactor.Also applies to: 46-46
88-91
: Proper client prop forwarding to WalletAddress components.Both
WalletAddress
instances correctly receive theclient
prop, ensuring consistent client context for wallet address rendering.Also applies to: 94-97
238-238
: Correct client extraction from contract.The client is properly extracted from
props.clientContract.client
and passed down to the UI component.apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/modules/components/module-instance.tsx (2)
15-18
: Appropriate prop type refinement.Correctly omits
"client"
fromModuleCardUIProps
sinceModuleInstanceProps
will provide the client from itscontract.client
property.
55-62
: Proper client prop provision to fallback component.The fallback
ModuleCardUI
render correctly receives theclient
prop extracted fromprops.contract.client
, ensuring the component has access to theThirdwebClient
instance for wallet address rendering.apps/dashboard/src/app/(app)/account/wallets/LinkWalletUI.tsx (2)
30-30
: Consistent client prop threading across component hierarchy.The
ThirdwebClient
import and prop additions are implemented consistently acrossLinkWallet
,LinkWalletUI
, andUnlinkButton
components, ensuring proper client context flow.Also applies to: 36-36, 65-65, 152-152
105-105
: Proper client forwarding to WalletAddress components.Both
WalletAddress
instances in the table and dialog correctly receive theclient
prop, maintaining consistent client context for wallet address rendering.Also applies to: 191-191
apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/cloud/tx/[id]/transaction-details-ui.tsx (2)
16-16
: LGTM: Clean refactor to explicit client prop injection.The component interface changes follow the established pattern perfectly - importing
ThirdwebClient
, adding it to the props interface, and updating the function signature. This aligns well with the PR's objective to reduce hook usage in favor of explicit prop passing.Also applies to: 22-22, 26-26
184-184
: Excellent client prop propagation to child components.The
client
prop is correctly passed to all components that need it:
ChainIconClient
for chain icon renderingWalletAddress
components for both sender and signer addressesThis ensures consistent client context throughout the component tree.
Also applies to: 206-206, 215-215
apps/dashboard/src/components/pay/PayAnalytics/components/PaymentHistory.tsx (3)
17-17
: Well-designed prop interface separation.The refactor correctly separates concerns by introducing:
client: ThirdwebClient
for UI components requiring client contextprojectClientId: string
for API authenticationThis separation makes the component's dependencies explicit and improves maintainability.
Also applies to: 28-31
37-37
: Proper React Query key and API call updates.The query key correctly uses
projectClientId
instead of the oldclientId
, and thegetPayments
call is updated accordingly. This ensures proper caching behavior and API authentication.Also applies to: 40-40
86-92
: Consistent client prop propagation through component hierarchy.The
client
prop is properly passed fromPaymentHistory
→TableRow
→WalletAddress
, ensuring the ThirdwebClient context is available where needed for wallet address rendering and social profile fetching.Also applies to: 125-125, 191-191
apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/_utils/getEngineInstancePageMeta.ts (4)
1-2
: Appropriate imports for team data and client creation.The new imports
getTeamBySlug
andgetClientThirdwebClient
are correctly added to support the enhanced functionality of creating an authenticated ThirdwebClient instance.
16-20
: Efficient concurrent data fetching.Using
Promise.all
to fetch auth token, account, and team data concurrently is an excellent performance optimization. This reduces the overall loading time by parallelizing independent async operations.
33-36
: Proper validation of required data.The validation ensures both
instance
andteam
exist before proceeding, which is crucial for creating a properly configured ThirdwebClient. ThenotFound()
call provides appropriate error handling.
38-43
: Well-structured client creation and return.The ThirdwebClient is properly created using the JWT token and team ID, then included in the return object alongside existing data. This follows the dependency injection pattern established throughout the PR.
apps/dashboard/src/components/pay/PayAnalytics/PayAnalytics.tsx (2)
5-5
: Consistent prop interface refactor.The component correctly adopts the established pattern by:
- Importing
ThirdwebClient
type- Replacing
clientId
withprojectClientId
andclient
props- Maintaining backward compatibility for other existing props
This aligns perfectly with the systematic refactor across the codebase.
Also applies to: 16-22
89-89
: Proper client prop propagation to child components.The
client
prop is correctly passed down to:
PayCustomersTable
for wallet address renderingPaymentHistory
along with theprojectClientId
for API callsThis ensures consistent client context throughout the pay analytics feature.
Also applies to: 92-96
apps/dashboard/src/components/embedded-wallets/Users/index.tsx (4)
21-22
: LGTM! Proper imports for the refactor.The addition of
useMemo
andThirdwebClient
type imports are correctly placed and necessary for the changes made in this component.
41-43
: Good prop interface updates.The renaming from
clientId
toprojectClientId
provides better clarity, and the addition of theclient
prop follows the established pattern for this refactor.
44-111
: Excellent memoization implementation.The
useMemo
wrapper for columns withclient
dependency is well-implemented:
- Prevents unnecessary re-renders when only other props change
- Correctly includes
client
in the dependency array- Properly passes
client
to theWalletAddress
component in the cell rendererThis follows React performance best practices.
117-117
: Consistent prop renaming throughout.All references to
clientId
have been correctly updated toprojectClientId
, ensuring consistency across the component's usage of hooks and callbacks.Also applies to: 156-156, 177-177
apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(instance)/[engineId]/overview/components/backend-wallets-table.tsx (4)
69-70
: Proper interface extension.The addition of the
client: ThirdwebClient
prop to theBackendWalletsTableProps
interface correctly extends the component's API to support explicit client passing.
152-153
: Correct client prop forwarding in table cells.The
WalletAddress
component properly receives theclient
prop in the address column cell renderer, maintaining consistency with the refactor pattern.
271-271
: Comprehensive modal prop threading.All modal components (
EditModal
,ReceiveFundsModal
,SendFundsModal
,DeleteModal
) correctly receive theclient
prop, ensuring consistent client context throughout the component tree.Also applies to: 278-278, 289-289, 298-298
310-310
: Complete modal interface and usage updates.All modal interfaces properly include the
client: ThirdwebClient
prop, and allWalletAddress
usages within modals correctly receive the client prop. TheChainIconClient
inSendFundsModal
also properly receives the client, showing thorough attention to all client-dependent components.Also applies to: 316-316, 373-373, 404-404, 408-408, 447-447, 540-540, 605-607, 633-633, 639-639, 705-705
apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/cloud/server-wallets/wallet-table/wallet-table.tsx (2)
2-2
: Correct type import addition.The
ThirdwebClient
type import is properly added to support the new client prop.
14-14
: Clean prop threading implementation.The
client
prop is correctly added to the component interface and properly forwarded to theServerWalletsTableUI
child component. This maintains the separation of concerns while enabling explicit client dependency injection.Also applies to: 23-23, 34-34
apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/cloud/server-wallets/wallet-table/wallet-table-ui.client.tsx (5)
35-35
: Proper type import for client prop.The
ThirdwebClient
type import is correctly added to support the new explicit client dependency.
51-51
: Correct component interface update.The
client: ThirdwebClient
prop is properly added to the component interface, enabling explicit dependency injection instead of hook-based client access.Also applies to: 60-60
116-116
: Proper client prop forwarding in conditional rendering.Both branches of the conditional rendering correctly pass the
client
prop to their respective components (WalletAddress
andSmartAccountCell
), maintaining functionality while following the new pattern.Also applies to: 118-118
199-205
: Clean SmartAccountCell interface update.The
SmartAccountCell
component interface is properly updated to accept theclient
prop, following the same pattern as other components in this refactor.
213-213
: Effective hook replacement with direct client usage.The direct usage of the
client
prop inpredictSmartAccountAddress
and proper forwarding toWalletAddress
successfully replaces the previous hook-based approach while maintaining all functionality.Also applies to: 226-229
.../(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/modules/components/BatchMetadata.tsx
Show resolved
Hide resolved
...rc/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/connect/in-app-wallets/users/page.tsx
Show resolved
Hide resolved
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.
one small nitpick, otherwise LGTM
@@ -2,6 +2,7 @@ import { getProject } from "@/api/projects"; | |||
import { NEXT_PUBLIC_THIRDWEB_VAULT_URL } from "@/constants/public-envs"; | |||
import { createVaultClient, listEoas } from "@thirdweb-dev/vault-sdk"; | |||
import { notFound } from "next/navigation"; | |||
import { getClientThirdwebClient } from "../../../../../../../../../@/constants/thirdweb-client.client"; |
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.
nit: use the absolute path
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 primarily focuses on adding a `client` prop to various components across the dashboard application, enhancing their functionality and ensuring consistent access to the `ThirdwebClient`. ### Detailed summary - Added `client` prop to `BatchMetadata`, `Royalty`, `Mintable`, `Transferable`, `Claimable`, and other components. - Updated `WalletAddress` component to accept `client` prop in multiple instances. - Enhanced various tables and UI components to utilize the `client` prop for improved data handling. - Refactored existing components to ensure compatibility with the new `client` prop, ensuring consistent client access throughout the application. > ✨ 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** - Enhanced all WalletAddress displays across the dashboard to accept and utilize a new client context for improved integration and consistency. - **Refactor** - Updated multiple components and their props to require and pass a client instance, ensuring unified client handling throughout tables, modals, and analytics views. - Replaced static table column definitions with dynamic, memoized columns that respond to client changes. - Standardized prop names related to client identification for clarity and maintainability. - **Bug Fixes** - Ensured client context is consistently propagated to all relevant child components, preventing potential rendering or data issues. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
4d69067
to
0262763
Compare
PR-Codex overview
This PR primarily focuses on enhancing various components across the dashboard by adding a
client
prop to several components, improving their integration with theThirdwebClient
. This change facilitates better client management for wallet and transaction functionalities.Detailed summary
client
prop to components includingBatchMetadata
,Royalty
,Mintable
, and others.WalletAddress
components to utilize theclient
prop for improved functionality.client
for better state management.client
prop integration.Summary by CodeRabbit