Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions ch1/1.2/client.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ class Client {
}

// Creates a keccak256/SHA3 hash of some data
Hash(data) {
hash(data) {
const dataStr = JSON.stringify(data);
return EthCrypto.hash.keccak256(data);
}

// Signs a hash of data with the client's private key
sign(message) {
const messageHash = this.toHash(message);
const messageHash = this.hash(message);
return EthCrypto.sign(this.wallet.privateKey, messageHash);
}

Expand Down