Commit e299a795 by Chenyang Wu Committed by Facundo Spagnuolo

Change ECRecovery recover method's visibility to internal (#818)

* Change ECRecovery recover method's visibility to internal

* Adopt the test

* Remove unused imports
parent b33260ac
...@@ -14,7 +14,7 @@ library ECRecovery { ...@@ -14,7 +14,7 @@ library ECRecovery {
* @param hash bytes32 message, the hash is the signed message. What is recovered is the signer address. * @param hash bytes32 message, the hash is the signed message. What is recovered is the signer address.
* @param sig bytes signature, the signature is generated using web3.eth.sign() * @param sig bytes signature, the signature is generated using web3.eth.sign()
*/ */
function recover(bytes32 hash, bytes sig) public pure returns (address) { function recover(bytes32 hash, bytes sig) internal pure returns (address) {
bytes32 r; bytes32 r;
bytes32 s; bytes32 s;
uint8 v; uint8 v;
......
var ECRecoveryMock = artifacts.require('ECRecoveryMock'); var ECRecoveryMock = artifacts.require('ECRecoveryMock');
var ECRecoveryLib = artifacts.require('ECRecovery');
var hashMessage = require('../helpers/hashMessage.js'); var hashMessage = require('../helpers/hashMessage.js');
...@@ -8,8 +7,6 @@ contract('ECRecovery', function (accounts) { ...@@ -8,8 +7,6 @@ contract('ECRecovery', function (accounts) {
const TEST_MESSAGE = 'OpenZeppelin'; const TEST_MESSAGE = 'OpenZeppelin';
before(async function () { before(async function () {
const ecRecoveryLib = await ECRecoveryLib.new();
ECRecoveryMock.link('ECRecovery', ecRecoveryLib.address);
ecrecovery = await ECRecoveryMock.new(); ecrecovery = await ECRecoveryMock.new();
}); });
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment