diff options
author | Remco Bloemen <remco@wicked.ventures> | 2018-02-22 08:53:07 +0800 |
---|---|---|
committer | Amir Bandeali <abandeali1@gmail.com> | 2018-04-21 04:56:16 +0800 |
commit | 09b99bbf8beae04f8ded2f977fece4651767cbb0 (patch) | |
tree | 8744df64e741af7b92b07966dd574f6260c39ede /packages/contracts | |
parent | 92e112dc63f5d30c96718906f370da537f096a0b (diff) | |
download | dexon-sol-tools-09b99bbf8beae04f8ded2f977fece4651767cbb0.tar dexon-sol-tools-09b99bbf8beae04f8ded2f977fece4651767cbb0.tar.gz dexon-sol-tools-09b99bbf8beae04f8ded2f977fece4651767cbb0.tar.bz2 dexon-sol-tools-09b99bbf8beae04f8ded2f977fece4651767cbb0.tar.lz dexon-sol-tools-09b99bbf8beae04f8ded2f977fece4651767cbb0.tar.xz dexon-sol-tools-09b99bbf8beae04f8ded2f977fece4651767cbb0.tar.zst dexon-sol-tools-09b99bbf8beae04f8ded2f977fece4651767cbb0.zip |
Explicit returns
Diffstat (limited to 'packages/contracts')
-rw-r--r-- | packages/contracts/src/contracts/current/protocol/Exchange/MixinSignatureValidator.sol | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/packages/contracts/src/contracts/current/protocol/Exchange/MixinSignatureValidator.sol b/packages/contracts/src/contracts/current/protocol/Exchange/MixinSignatureValidator.sol index d7020caa2..8555efa85 100644 --- a/packages/contracts/src/contracts/current/protocol/Exchange/MixinSignatureValidator.sol +++ b/packages/contracts/src/contracts/current/protocol/Exchange/MixinSignatureValidator.sol @@ -66,7 +66,7 @@ contract MixinSignatureValidator is } else if (signatureType == SignatureType.Invalid) { require(signature.length == 1); isValid = false; - return; + return isValid; // Implicitly signed by caller // The signer has initiated the call. In the case of non-contract @@ -79,7 +79,7 @@ contract MixinSignatureValidator is } else if (signatureType == SignatureType.Caller) { require(signature.length == 1); isValid = signer == msg.sender; - return; + return isValid; // Signed using web3.eth_sign } else if (signatureType == SignatureType.Ecrecover) { @@ -94,7 +94,7 @@ contract MixinSignatureValidator is s ); isValid = signer == recovered; - return; + return isValid; // Signature using EIP712 } else if (signatureType == SignatureType.EIP712) { @@ -103,12 +103,12 @@ contract MixinSignatureValidator is s = get32(signature, 35); address recovered = ecrecover(hash, v, r, s); isValid = signer == recovered; - return; + return isValid; // Signature verified by signer contract } else if (signatureType == SignatureType.Contract) { isValid = ISigner(signer).isValidSignature(hash, signature); - return; + return isValid; } // Anything else is illegal (We do not return false because @@ -132,6 +132,7 @@ contract MixinSignatureValidator is assembly { result := mload(add(b, index)) } + return result; } } |