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

fix chain id #219

Merged
merged 2 commits into from
Mar 28, 2022
Merged

fix chain id #219

merged 2 commits into from
Mar 28, 2022

Conversation

Uxio0
Copy link
Member

@Uxio0 Uxio0 commented Mar 28, 2022

  • Fix chainId for not existing networks on our enum
  • Set version 3.9.1

@Uxio0 Uxio0 requested review from a team, rmeissner, fmrsabino and jpalvarezl March 28, 2022 09:46
Copy link
Contributor

@fmrsabino fmrsabino left a comment

Choose a reason for hiding this comment

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

Wouldn't we still have partial functionality in the end?

  • get_chain_id would work for any chain
  • get_network would only work with our enum

@Uxio0
Copy link
Member Author

Uxio0 commented Mar 28, 2022

Wouldn't we still have partial functionality in the end?

  • get_chain_id would work for any chain
  • get_network would only work with our enum

Yes, I don't like it either... Do you have any idea?

@fmrsabino
Copy link
Contributor

Wouldn't we still have partial functionality in the end?

  • get_chain_id would work for any chain
  • get_network would only work with our enum

Yes, I don't like it either... Do you have any idea?

I think if the core functionality relies on the supported networks of the enum then I would still use the enum and the chain id still needs to be in the enum.

I think it's fine if we say that the networks that we support were part of a review process so it shouldn't work with any chain_id but with the ones that we reviewed (since we have dependencies like block explorers, and other types of metadata).

The alternative would be to refactor anything to not take the enum into consideration and work with the chain id while taking the metadata that we have right now in the repo as optional.

@Uxio0
Copy link
Member Author

Uxio0 commented Mar 28, 2022

I think if the core functionality relies on the supported networks of the enum then I would still use the enum and the chain id still needs to be in the enum.

Then you are breaking people trying to use this library (or even the safe-cli) on private networks

I think it's fine if we say that the networks that we support were part of a review process so it shouldn't work with any chain_id but with the ones that we reviewed (since we have dependencies like block explorers, and other types of metadata).

I disagree, we should try to support every network possible without our intervention.

The alternative would be to refactor anything to not take the enum into consideration and work with the chain id while taking the metadata that we have right now in the repo as optional.

I think it's alright if we use the get_chain_id for basic operation and get_network when we need to work based on networks that exist (like checking the balances or configuring stuff depending on the network)

@fmrsabino
Copy link
Contributor

Then you are breaking people trying to use this library (or even the safe-cli) on private networks

We are not as this is the current behaviour or was this issue introduced recently? 🤔

I disagree, we should try to support every network possible without our intervention.

That's what I meant: "I think it's fine if we say" – this is to say that depending on the scope of what we want to support then I can understand this change.

So if it's clear that we want to support any chain then I think we should say what might not work if the chain is not part of the enum.

I think it's alright if we use the get_chain_id for basic operation and get_network when we need to work based on networks that exist (like checking the balances or configuring stuff depending on the network)

Also fine with me. I think it just needs to be clear our level of support because before we would not support chains not available under the enum.

@Uxio0
Copy link
Member Author

Uxio0 commented Mar 28, 2022

We are not as this is the current behaviour or was this issue introduced recently? 🤔

This is the current behaviour, detected today by checking an issue on the safe-cli

Also fine with me. I think it just needs to be clear our level of support because before we would not support chains not available under the enum.

I updated the docs to make it clear

Copy link
Contributor

@fmrsabino fmrsabino left a comment

Choose a reason for hiding this comment

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

As I mentioned in #219 (comment)

For me this change is fine although it seems to be more like a major release in terms of support than an hotfix.

But this is just my personal take on it.

@Uxio0 Uxio0 force-pushed the fix-chain-id branch 2 times, most recently from 047303f to f6aec21 Compare March 28, 2022 10:32
@Uxio0
Copy link
Member Author

Uxio0 commented Mar 28, 2022

As I mentioned in #219 (comment)

For me this change is fine although it seems to be more like a major release in terms of support than an hotfix.

But this is just my personal take on it.

For me it's only a hotfix. There's no change on any function or signature

@coveralls
Copy link

Coverage Status

Coverage increased (+0.006%) to 90.901% when pulling 8946792 on fix-chain-id into b585a43 on master.

@Uxio0 Uxio0 merged commit e8959c6 into master Mar 28, 2022
@Uxio0 Uxio0 deleted the fix-chain-id branch March 28, 2022 10:44
@github-actions github-actions bot locked and limited conversation to collaborators Mar 28, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants