-
Notifications
You must be signed in to change notification settings - Fork 13
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
use arbitrum for submissions on ethereum vaults #659
base: develop
Are you sure you want to change the base?
Conversation
WalkthroughThe recent updates to the Changes
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
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 as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
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.
Review Status
Actionable comments generated: 1
Configuration used: CodeRabbit UI
Files selected for processing (1)
- packages/web/src/contracts/write/LogClaim.ts (3 hunks)
Additional comments: 2
packages/web/src/contracts/write/LogClaim.ts (2)
- 3-4: The import statements for
IS_PROD
andwagmiChains
are correctly added to facilitate environment-based network selection and dynamic network handling. This aligns with the PR objectives to enhance interaction with Ethereum vaults through Arbitrum.- 40-40: The
switchNetworkAndValidate
function is correctly used to handle network switching and validation. This is a crucial part of the PR's objective to improve the reliability and efficiency of network switching in relation to the vault's chain requirements. However, ensure that error handling is robust around this network switching logic to gracefully handle any failures or exceptions that might occur during the network switch process.
const DEFAULT_NETWORK_TO_USE = IS_PROD ? wagmiChains.arbitrum.id as number : wagmiChains.sepolia.id as number; | ||
let useChaniId = DEFAULT_NETWORK_TO_USE; | ||
vault!.chainId != wagmiChains.mainnet.id ? useChaniId = vault!.chainId:null; |
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.
The logic for determining the default network to use (DEFAULT_NETWORK_TO_USE
) and the assignment of useChaniId
based on the vault's chain ID is implemented. However, there's a typo in the variable name useChaniId
which should likely be useChainId
. This typo could lead to confusion and potential bugs in the future.
- let useChaniId = DEFAULT_NETWORK_TO_USE;
+ let useChainId = DEFAULT_NETWORK_TO_USE;
Additionally, the ternary operation for setting useChainId
based on the vault's chain ID is a bit unconventional. Consider simplifying this logic for clarity and maintainability.
- vault!.chainId != wagmiChains.mainnet.id ? useChaniId = vault!.chainId:null;
+ if (vault?.chainId && vault.chainId !== wagmiChains.mainnet.id) {
+ useChainId = vault.chainId;
+ }
Deploying with Cloudflare Pages
|
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.
Review Status
Actionable comments generated: 0
Configuration used: CodeRabbit UI
Files selected for processing (1)
- packages/web/src/contracts/write/LogClaim.ts (3 hunks)
Files skipped from review as they are similar to previous changes (1)
- packages/web/src/contracts/write/LogClaim.ts
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.
Review Status
Actionable comments generated: 0
Configuration used: CodeRabbit UI
Files selected for processing (1)
- packages/web/src/contracts/write/LogClaim.ts (3 hunks)
Files skipped from review as they are similar to previous changes (1)
- packages/web/src/contracts/write/LogClaim.ts
Summary by CodeRabbit
LogClaim
feature for improved compatibility with multiple blockchain networks.