-
Notifications
You must be signed in to change notification settings - Fork 3
Stg bugfixes #74
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
Stg bugfixes #74
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -15,8 +15,9 @@ const createExplorerApis = (chainId) => { | |
| const etherscanApi = createEtherscanApi(chainId) | ||
| const blockscoutApi = createBlockscoutApi(chainId) | ||
| apis.push(etherscanApi, blockscoutApi) | ||
| break; | ||
| break | ||
| case '421613': | ||
| case '42161': | ||
| const arbiscanApi = createArbiscanApi(chainId) | ||
| apis.push(arbiscanApi) | ||
| break | ||
|
Comment on lines
15
to
23
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The current implementation creates multiple API instances regardless of the chainId. This could lead to unnecessary memory usage and potential performance issues if the number of APIs grows. It would be more efficient to create only the API instance that corresponds to the provided chainId. |
||
|
|
||
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 current approach of hardcoding the URLs for different chains is not maintainable. If the URLs change in the future, or if new chains are added, the code will need to be updated and redeployed. A more maintainable approach would be to store these URLs in a configuration file or environment variables. This way, changes can be made without modifying the code.