Skip to content

Commit

Permalink
Migrate utils-cryptography to ethers (#4749)
Browse files Browse the repository at this point in the history
Co-authored-by: Hadrien Croubois <[email protected]>
Co-authored-by: ernestognw <[email protected]>
  • Loading branch information
3 people authored Nov 23, 2023
1 parent e473bcf commit 9702b67
Show file tree
Hide file tree
Showing 6 changed files with 185 additions and 290 deletions.
5 changes: 3 additions & 2 deletions test/helpers/eip712.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,9 @@ function domainType(domain) {
}

function hashTypedData(domain, structHash) {
return ethers.keccak256(
Buffer.concat(['0x1901', ethers.TypedDataEncoder.hashDomain(domain), structHash].map(ethers.toBeArray)),
return ethers.solidityPackedKeccak256(
['bytes', 'bytes32', 'bytes32'],
['0x1901', ethers.TypedDataEncoder.hashDomain(domain), structHash],
);
}

Expand Down
63 changes: 0 additions & 63 deletions test/helpers/sign.js

This file was deleted.

Loading

0 comments on commit 9702b67

Please sign in to comment.