From fb713432f353c8df574ff463ea4363e37bfa0188 Mon Sep 17 00:00:00 2001 From: Aniket Date: Tue, 13 Mar 2018 15:24:23 +0530 Subject: [PATCH] Minor improvement --- contracts/ECRecovery.sol | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/contracts/ECRecovery.sol b/contracts/ECRecovery.sol index 709ee43cb..c5b6d8f64 100644 --- a/contracts/ECRecovery.sol +++ b/contracts/ECRecovery.sol @@ -41,13 +41,12 @@ library ECRecovery { return (address(0)); } else { - /* - * https://github.com/ethereum/go-ethereum/issues/3731 - */ + /* + * https://github.com/ethereum/go-ethereum/issues/3731 + */ - bytes memory prefix = "\x19Ethereum Signed Message:\n32"; - hash = keccak256(prefix, hash); - return ecrecover(hash, v, r, s); + bytes memory prefix = "\x19Ethereum Signed Message:\n32"; + return ecrecover(keccak256(prefix, hash), v, r, s); } }