Skip to content

Commit d7adc73

Browse files
bonustrackChaituVR
andauthored
Remove ethereumjs-util (snapshot-labs#305)
* Test without bufferToHex * Remove ethereumjs-util * Replace ethereumjs-util with ethers Co-authored-by: Chaitanya <[email protected]>
1 parent 07d8ff4 commit d7adc73

File tree

3 files changed

+23
-152
lines changed

3 files changed

+23
-152
lines changed

package-lock.json

+21-149
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
"bs58": "^4.0.1",
2626
"cross-fetch": "^3.0.6",
2727
"eth-ens-namehash": "^2.0.8",
28-
"ethereumjs-util": "^7.0.7",
2928
"json-to-graphql-query": "^2.0.0",
3029
"lodash.set": "^4.3.2",
3130
"lodash.tonumber": "^4.0.3"

src/utils/web3.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
import { bufferToHex } from 'ethereumjs-util';
1+
import { hexlify } from '@ethersproject/bytes';
22

33
export async function signMessage(web3, msg, address) {
4-
msg = bufferToHex(new Buffer(msg, 'utf8'));
4+
msg = hexlify(new Buffer(msg, 'utf8'));
55
return await web3.send('personal_sign', [msg, address]);
66
}
77

0 commit comments

Comments
 (0)