Merge pull request #5433 from ethereum/docs-fix

Fix indentation in documentation
This commit is contained in:
Alex Beregszaszi 2018-11-14 21:03:26 +00:00 committed by GitHub
commit f8b36fdf66
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -685,9 +685,7 @@ as it provides a number of other security benefits.
::
/// Hashing first makes things easier
var hash = web3.utils.sha3("message to sign");
web3.eth.personal.sign(hash, web3.eth.defaultAccount, function () {
console.log("Signed")
});
web3.eth.personal.sign(hash, web3.eth.defaultAccount, function () { console.log("Signed"); });
.. note::
The ``web3.eth.personal.sign`` prepends the length of the message to the signed data. Since we hash first, the message will always be exactly 32 bytes long, and thus this length prefix is always the same.