Skip to content

Commit

Permalink
Update era node and eth_account
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielSchiavini committed May 24, 2024
1 parent 8dd3c37 commit cf4c73f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/unit-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
--silent --output /usr/local/bin/zkvyper && \
chmod +x /usr/local/bin/zkvyper && \
zkvyper --version
curl --location https://github.com/matter-labs/era-test-node/releases/download/v0.1.0-alpha.21/era_test_node-v0.1.0-alpha.21-x86_64-unknown-linux-gnu.tar.gz \
curl --location https://github.com/matter-labs/era-test-node/releases/download/v0.1.0-alpha.22/era_test_node-v0.1.0-alpha.22-x86_64-unknown-linux-gnu.tar.gz \
--silent --output era_test_node.tar.gz && \
tar --extract --file=era_test_node.tar.gz && \
mv era_test_node /usr/local/bin/era_test_node && \
Expand Down
10 changes: 2 additions & 8 deletions tests/unitary/pool/token/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,7 @@
import boa
import pytest
from eth_account import Account as EthAccount
from eth_account._utils.structured_data.hashing import (
hash_domain,
hash_message,
)
from eth_account.messages import SignableMessage
from eth_account.messages import encode_typed_data
from hexbytes import HexBytes


Expand Down Expand Up @@ -50,9 +46,7 @@ def _sign_permit(swap, owner, spender, value, deadline):
nonce=swap.nonces(owner.address),
deadline=deadline,
)
signable_message = SignableMessage(
b"\x01", hash_domain(struct), hash_message(struct)
)
signable_message = encode_typed_data(full_message=struct)
return EthAccount.sign_message(signable_message, owner._private_key)

return _sign_permit

0 comments on commit cf4c73f

Please sign in to comment.