diff --git a/ch1/1.2/client.js b/ch1/1.2/client.js index be467ce8..40c742df 100644 --- a/ch1/1.2/client.js +++ b/ch1/1.2/client.js @@ -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); }