Skip to content
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

💥 Amend Network Additions #279

Merged

Conversation

itxtoledo
Copy link
Contributor

✅ PR Checklist

  • Because this PR includes a bug fix, relevant tests have been included.
  • Because this PR includes a new feature, the change was previously discussed in an issue or in the discussions section.
  • I didn't do anything of this.

🕓 Changelog

This PR aims to achieve two things:

  1. Simplify the process of adding new networks. Now, you just need to add a line to the networksInfo object to make it work, whereas before, you had to modify two different arrays.
  2. Add typing to the configuration of networks supported by the plugin.

🐶 Cute Animal Picture

Put a link to a cute animal picture inside the parenthesis-->

@pcaversaccio pcaversaccio self-requested a review August 25, 2024 10:50
@pcaversaccio pcaversaccio self-assigned this Aug 25, 2024
@pcaversaccio pcaversaccio added the feature 💥 New feature or request label Aug 25, 2024
Copy link
Owner

@pcaversaccio pcaversaccio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@itxtoledo thx for this PR. I need to think about your suggested changes since it's essentially a breaking API change for the user in the configuration due to the type change. Also, adding a new network to xdeployer is currently a question of a minute :)

@pcaversaccio pcaversaccio changed the title Feat: improve the way to add a new network 💥 Amend Network Additions Aug 25, 2024
@itxtoledo
Copy link
Contributor Author

@itxtoledo thx for this PR. I need to think about your suggested changes since it's essentially a breaking API change for the user in the configuration due to the type change. Also, adding a new network to xdeployer is currently a question of a minute :)

It not break the API, it adds code completion since now the user will now exactly which networks are available.

Signed-off-by: Pascal Marco Caversaccio <[email protected]>
Copy link
Owner

@pcaversaccio pcaversaccio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this refactor. I slightly adjusted the getTxHashLink and getAddressLink functions, using ternary operators.

@pcaversaccio pcaversaccio merged commit 3a420f6 into pcaversaccio:main Sep 2, 2024
7 checks passed
@itxtoledo
Copy link
Contributor Author

Thank you for this package !

@itxtoledo itxtoledo deleted the feat/improve-adding-new-network branch September 2, 2024 11:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature 💥 New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants