- Created a new component 'AddChainToWallet' to facilitate adding chains to wallet.
- Integrated 'AddChainToWallet' button into ChainPageLayout.
- Updated layout.tsx to include 'AddChainToWallet' button and its behavior.
- Refactored chain verification and metadata handling to accommodate the new feature.
- Adjusted related utility functions in utils.ts.
<!-- start pr-codex -->
---
## PR-Codex overview
The focus of this PR is to update the chainlist components by introducing a new `isVerified` flag and refactoring the rendering logic based on it.
### Detailed summary
- Introduces `isVerified` flag to determine if chain metadata is available
- Updates rendering logic in `ChainListRow` and `ChainListCard` components based on `isVerified`
- Adds `AddChainToWallet` component for connecting to chains
- Adjusts layout and styling based on `isVerified` flag and chain metadata
> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`
<!-- end pr-codex -->
<!-- start pr-codex -->
## PR-Codex overview
This PR updates dependencies in the project, including `@thirdweb-dev/react`, `@thirdweb-dev/react-core`, and `@thirdweb-dev/sdk`.
### Detailed summary
- Updated `@thirdweb-dev/react` from version 4.7.0 to 4.8.0
- Updated `@thirdweb-dev/react-core` from version 4.7.0 to 4.8.0
- Updated `@thirdweb-dev/sdk` from version 4.0.93 to 4.0.94
> The following files were skipped due to too many changes: `pnpm-lock.yaml`
> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`
<!-- end pr-codex -->
<!-- start pr-codex -->
## PR-Codex overview
This PR improves the toggleService function in `filters.tsx` to correctly handle service selection in the client filters.
### Detailed summary
- Refactored logic to toggle service selection based on existing parameters
- Improved handling of adding/removing services in the search parameters
> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`
<!-- end pr-codex -->
<!-- start pr-codex -->
## PR-Codex overview
The focus of this PR is to improve chain filtering and display in the dashboard.
### Detailed summary
- Refactored `getChainsToRender` to return more data
- Updated data display to show total, filtered, and displayed chains
- Improved pagination logic to consider filtered chains
> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`
<!-- end pr-codex -->
<!-- start pr-codex -->
## PR-Codex overview
This PR updates the ESLint configuration to change the severity level of the `no-restricted-syntax` rule for `useEffect` calls from "warn" to "error".
### Detailed summary
- Updated `no-restricted-syntax` rule severity level for `useEffect` calls from "warn" to "error" in `.eslintrc.js`.
> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`
<!-- end pr-codex -->
<!-- start pr-codex -->
## PR-Codex overview
This PR adds a new ESLint rule to warn against using `useEffect` and suggests using `useQuery` for async functions instead.
### Detailed summary
- Added ESLint rule to warn against using `useEffect` for async functions
- Suggests using `useQuery` instead for async operations
> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`
<!-- end pr-codex -->
<!-- start pr-codex -->
## PR-Codex overview
This PR ensures optional chaining is used to access properties in various components, preventing errors when properties are undefined.
### Detailed summary
- Added optional chaining to access `chain` properties in multiple components
- Ensured safe access to `chain.explorers` and `chain.icon` properties
> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`
<!-- end pr-codex -->
fixes: DASH-43
<!-- start pr-codex -->
---
## PR-Codex overview
This PR enhances address and chainId comparison in two components to ensure accurate data retrieval.
### Detailed summary
- Updated address and chainId comparison logic in `primary-dashboard-button.tsx`
- Improved address and chainId comparison in `modal.tsx`
> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`
<!-- end pr-codex -->
<img width="442" alt="image" src="https://github.com/thirdweb-dev/dashboard/assets/26052673/d4bc3298-c5e1-4360-8127-358f35fd2230">
smol change to improve ux
<!-- start pr-codex -->
---
## PR-Codex overview
This PR focuses on adding an `AddressCopyButton` component to display and copy the asset contract address in the listing drawer.
### Detailed summary
- Added `AddressCopyButton` component to display and copy asset contract address
- Aligned asset contract address and token ID headings in a 12-column grid layout
> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`
<!-- end pr-codex -->
<!-- start pr-codex -->
## PR-Codex overview
This PR updates the `href` attribute in `chainlist-row.tsx` to conditionally render the `p.id` value based on whether it is "contracts".
### Detailed summary
- Updated `href` attribute to conditionally render `p.id` based on value "contracts"
> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`
<!-- end pr-codex -->
<!-- start pr-codex -->
## PR-Codex overview
The focus of this PR is to refactor the favorite chains feature, adding a new hook `useFavoriteChains` and integrating it into various components.
### Detailed summary
- Added `bundledDependencies: false` in `pnpm-lock.yaml`
- Renamed `useFavouriteChains` to `useFavouriteChainIds`
- Introduced `useFavoriteChains` hook for fetching and handling favorite chains
- Updated components to use `useFavoriteChains` for favorite chains data
- Reorganized network selector button to display favorite chains
- Refactored `CustomConnectWallet` to utilize `useFavoriteChains` for favorite chains display
> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`
<!-- end pr-codex -->
<!-- start pr-codex -->
## PR-Codex overview
This PR updates various dependencies across the project, including `@thirdweb-dev` packages, `next`, `prettier`, and more.
### Detailed summary
- Updated `@thirdweb-dev` packages to new versions
- Updated `next` to version 14.2.4
- Updated `prettier` to version 3.3.2
- Updated various other dependencies to their latest versions
> The following files were skipped due to too many changes: `pnpm-lock.yaml`
> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`
<!-- end pr-codex -->
<!-- start pr-codex -->
## PR-Codex overview
This PR updates various functions in `useEngine.ts` and `engine-instances-table.tsx`. It includes improvements like handling response bodies and error messages more efficiently.
### Detailed summary
- Improved handling of response bodies in API requests
- Enhanced error messaging for unauthorized and unreachable servers
- Refactored `onClickConnect` to use `useMutation`
- Updated form submission logic in modals for editing, removing, and canceling Engine instances
> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`
<!-- end pr-codex -->
<!-- start pr-codex -->
## PR-Codex overview
The focus of this PR is to add new hooks for editing, removing, and managing engine instances in the React app.
### Detailed summary
- Added `useEngineRemoveFromDashboard`, `useEngineRemoveCloudHosted`, and `useEngineEditInstance` hooks
- Updated error handling in existing hooks
- Modified components related to engine instances and subscription cancellation
> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`
<!-- end pr-codex -->
<!-- start pr-codex -->
## PR-Codex overview
This PR updates the `chain-icon.tsx` file in the `server` folder of the `chain` component in the `dashboard`. It adds a `cache` property and includes a new header based on a secret key.
### Detailed summary
- Added `cache: "force-cache"` property
- Added a new header `x-secret-key` based on `DASHBOARD_THIRDWEB_SECRET_KEY`
> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`
<!-- end pr-codex -->
<!-- start pr-codex -->
## PR-Codex overview
This PR updates the `BillingConnectWalletPrompt` component in `ConnectWallet.tsx`.
### Detailed summary
- Removed unused import `recentlyUsedChains` from hooks.
- Updated component name to `BillingConnectWalletPrompt`.
> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`
<!-- end pr-codex -->
<!-- start pr-codex -->
## PR-Codex overview
This PR introduces a new chain `ZkcandySepoliaTestnet` and updates the `useCustomContractDeployMutation` function to include it for checking `isZkSync`.
### Detailed summary
- Added `ZkcandySepoliaTestnet` chain
- Updated `useCustomContractDeployMutation` to check for `ZkcandySepoliaTestnet` chain for `isZkSync`
> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`
<!-- end pr-codex -->
<!-- start pr-codex -->
## PR-Codex overview
The focus of this PR is to update the `DashboardThirdwebProvider` component to adapt to the new version 5 of the thirdweb SDK.
### Detailed summary
- Updated `EVMContractInfo` to `type EVMContractInfo`
- Added new hooks: `useChain`, `useDisconnect`, `useSigner`, `useSwitchChain`
- Updated imports and added new dependencies
- Added `V4ToV5SignerAdapter` component for adapting wallets to version 5
- Utilized `ethers5Adapter`, `createWalletAdapter`, and `thirdwebClient` for adaptation
- Implemented logic for wallet adaptation and disconnection
> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`
<!-- end pr-codex -->
<!-- start pr-codex -->
## PR-Codex overview
This PR updates revalidation times in API fetch requests to improve data freshness:
### Detailed summary
- Updated revalidation time to 1 hour in `chain-icon.tsx`
- Updated revalidation time to 1 hour in `utils.ts`
- Updated revalidation time to 15 minutes in `utils.ts`
> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`
<!-- end pr-codex -->