Closed MohammadPCh closed 1 week ago
The latest updates on your projects. Learn more about Vercel for Git ↗︎
Name | Status | Preview | Comments | Updated (UTC) |
---|---|---|---|---|
giveth-dapps-v2 | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | Jun 23, 2024 11:55am |
The recent updates include version upgrades for several key dependencies in the package.json
, the addition of a new configuration option for chain support in the Web3 modal setup in pages/_app.tsx
, and the enhancement of conditional behavior in the WelcomeModal
component through the use of isConnected
from wagmi
.
Files | Change Summary |
---|---|
package.json |
Updated versions: @tanstack/react-query (5.36.0 to 5.45.1), @web3modal/wagmi (4.2.0 to 5.0.3), viem (2.10.5 to 2.16.1), wagmi (2.8.7 to 2.10.4) |
pages/_app.tsx |
Added allowUnsupportedChain: false in the object for createWeb3Modal() configuration. |
src/components/modals/WelcomeModal.tsx |
Imported useAccount from wagmi and used isConnected to adjust openConnectModal behavior. |
In files of code, updates gleam bright,
Dependencies climbed, a worthy flight,
Web3 now knows what chains to shun,
Modal’s wiser, knows who's on.
Rabbit’s pleased, the code’s now grand,
Adventures await in Crypto-land! 🐇💻✨
src/components/modals/WelcomeModal.tsx
[error] 50-55: Change to an optional chain. (lint/complexity/useOptionalChain) Unsafe fix: Change to an optional chain.pages/_app.tsx
[error] 227-227: Avoid passing content using the dangerouslySetInnerHTML prop. (lint/security/noDangerouslySetInnerHtml) Setting content using code can expose users to cross-site scripting (XSS) attacks
pages/_app.tsx
58-58: Detected a Generic API Key, potentially exposing access to various services and sensitive operations. (generic-api-key)
pages/_app.tsx
[warning] 128-128: 'url' is defined but never used. Allowed unused args must match /^_/u --- [warning] 174-174: React Hook useEffect has missing dependencies: 'asPath', 'pathname', 'query', and 'router'. Either include them or remove the dependency array
src/components/modals/WelcomeModal.tsx (2)
`8-8`: **Addition of `useAccount` from wagmi is appropriate for connection status logic.** This import is crucial for the new functionality added to handle connection status. It is correctly placed among other import statements. --- `26-26`: **Proper use of `isConnected` for dynamic modal behavior.** Extracting `isConnected` from `useAccount` and using it to conditionally adjust the modal's behavior is a logical enhancement, ensuring the modal reacts appropriately to the user's connection status. [APROVED]pages/_app.tsx (1)
`102-102`: **Configuring `allowUnsupportedChain` to `false` is a secure and necessary update.** Adding `allowUnsupportedChain: false` to the `createWeb3Modal` configuration ensures that the application does not attempt to connect to unsupported blockchain networks, enhancing security and user experience.
4271
Summary by CodeRabbit
New Features
allowUnsupportedChain: false
configuration to Web3Modal for better chain support management.WelcomeModal
functionality to conditionally adjust behavior based on connection status.Dependencies
@tanstack/react-query
to version5.45.1
.@web3modal/wagmi
to version5.0.3
.viem
to version2.16.1
.wagmi
to version2.10.4
.