Skip to content

Commit 3bebabb

Browse files
authored
accounts: remove redundant string conversion (#29184)
1 parent aadcb88 commit 3bebabb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

accounts/accounts.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ func TextHash(data []byte) []byte {
195195
//
196196
// This gives context to the signed message and prevents signing of transactions.
197197
func TextAndHash(data []byte) ([]byte, string) {
198-
msg := fmt.Sprintf("\x19Ethereum Signed Message:\n%d%s", len(data), string(data))
198+
msg := fmt.Sprintf("\x19Ethereum Signed Message:\n%d%s", len(data), data)
199199
hasher := sha3.NewLegacyKeccak256()
200200
hasher.Write([]byte(msg))
201201
return hasher.Sum(nil), msg

0 commit comments

Comments
 (0)