-
Notifications
You must be signed in to change notification settings - Fork 156
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
Port py-eth-sig-utils to eip712-structs #121
Conversation
8599a37
to
961637d
Compare
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.
Very nice PR, what do you think about the change I proposed?
gnosis/safe/safe_tx.py
Outdated
structured_data["domain"]["chainId"] = self.chain_id | ||
if safe_version >= Version("1.0.0"): | ||
|
||
class SafeTx(EIP712Struct): |
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 wouldn't define this class in an if
, I think it's better to do it at the beginning of the safe_tx.py
file. Then define 2 classes, LegacySafeTx
and SafeTx
and use them on the if clause
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.
Makes sense, pushed this change.
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.
Nice PR, thanks!
Followed @Uxio0 suggestion from here #120 (review)
Rewrote EIP712 code of SafeTx to match the library used in Protocol. Removed
py-eth-sig-utils
dependency.