-
Notifications
You must be signed in to change notification settings - Fork 7
Remove more dead code #604
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
Conversation
fhenneke
left a comment
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 changes look good.
I have not tested this change. Could you add a description of how to test this change?
src/config.py
Outdated
| if network == Network.LENS: | ||
| protocol_fee_safe = Address("0x07e5292b5aac443B2C9473Ab51B53ce8BDC3317B") | ||
| else: | ||
| protocol_fee_safe = Address("0x22af3D38E50ddedeb7C47f36faB321eC3Bb72A76") | ||
|
|
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.
I assume it was intentional to change from the syntax used in other places to this approach?
match network:
case (
Network.MAINNET
| Network.GNOSIS
| Network.ARBITRUM_ONE
| Network.BASE
| Network.AVALANCHE
| Network.POLYGON
| Network.BNB
):
protocol_fee_safe = Address("0x22af3D38E50ddedeb7C47f36faB321eC3Bb72A76")
case Network.LENS:
protocol_fee_safe = Address("0x07e5292b5aac443B2C9473Ab51B53ce8BDC3317B")
case _:
raise ValueError(
f"No buffer accounting config set up for network {network}."
)That other approach does have the advantage of being very explicit and notifying of missing configuration.
If you want to go for what you did here, I think adding an additional check for network in Network would be welcome.
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.
Good point. Pushed a fix
|
@fhenneke pushed some a small change, so pinging in case you want to have another look. Planning to merge later today |
fhenneke
left a comment
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.
Looks good. (I have not tested the change and are not planning on it due to missing instuctions.)
Follow-up to PR #592, and further addressing issue #560