accounts: remove redundant string conversion (#29184)
This commit is contained in:
parent
aadcb88675
commit
3bebabbd03
@ -195,7 +195,7 @@ func TextHash(data []byte) []byte {
|
||||
//
|
||||
// This gives context to the signed message and prevents signing of transactions.
|
||||
func TextAndHash(data []byte) ([]byte, string) {
|
||||
msg := fmt.Sprintf("\x19Ethereum Signed Message:\n%d%s", len(data), string(data))
|
||||
msg := fmt.Sprintf("\x19Ethereum Signed Message:\n%d%s", len(data), data)
|
||||
hasher := sha3.NewLegacyKeccak256()
|
||||
hasher.Write([]byte(msg))
|
||||
return hasher.Sum(nil), msg
|
||||
|
Loading…
Reference in New Issue
Block a user