From 12e16d532bd1844b561a5c1d32fc1c9b1fae2efc Mon Sep 17 00:00:00 2001 From: Greg Hysen Date: Wed, 20 Jun 2018 13:50:11 -0700 Subject: Renamed constants in test wallet/validator --- .../contracts/current/test/TestValidator/TestValidator.sol | 12 ++++++------ .../src/contracts/current/test/TestWallet/TestWallet.sol | 10 +++++----- 2 files changed, 11 insertions(+), 11 deletions(-) (limited to 'packages/contracts') diff --git a/packages/contracts/src/contracts/current/test/TestValidator/TestValidator.sol b/packages/contracts/src/contracts/current/test/TestValidator/TestValidator.sol index 7eba61073..13953b482 100644 --- a/packages/contracts/src/contracts/current/test/TestValidator/TestValidator.sol +++ b/packages/contracts/src/contracts/current/test/TestValidator/TestValidator.sol @@ -25,15 +25,15 @@ contract TestValidator is { // The single valid signer for this wallet. - address validSigner; + address VALID_SIGNER; /// @dev constructs a new `TestValidator` with a single valid signer. - /// @param _validSigner The sole, valid signer. - constructor (address _validSigner) public { - validSigner = _validSigner; + /// @param validSigner The sole, valid signer. + constructor (address validSigner) public { + VALID_SIGNER = validSigner; } - /// @dev Verifies that a signature is valid. `signer` must match `validSigner`. + /// @dev Verifies that a signature is valid. `signer` must match `VALID_SIGNER`. /// @param hash Message hash that is signed. /// @param signer Address that should have signed the given hash. /// @param signature Proof of signing. @@ -47,6 +47,6 @@ contract TestValidator is view returns (bool isValid) { - return (signer == validSigner); + return (signer == VALID_SIGNER); } } diff --git a/packages/contracts/src/contracts/current/test/TestWallet/TestWallet.sol b/packages/contracts/src/contracts/current/test/TestWallet/TestWallet.sol index e7ddf1d9f..aca74b409 100644 --- a/packages/contracts/src/contracts/current/test/TestWallet/TestWallet.sol +++ b/packages/contracts/src/contracts/current/test/TestWallet/TestWallet.sol @@ -29,12 +29,12 @@ contract TestWallet is string constant LENGTH_65_REQUIRED = "LENGTH_65_REQUIRED"; // The owner of this wallet. - address walletOwner; + address WALLET_OWNER; /// @dev constructs a new `TestWallet` with a single owner. - /// @param _walletOwner The owner of this wallet. - constructor (address _walletOwner) public { - walletOwner = _walletOwner; + /// @param walletOwner The owner of this wallet. + constructor (address walletOwner) public { + WALLET_OWNER = walletOwner; } /// @dev Validates an EIP712 signature. @@ -59,7 +59,7 @@ contract TestWallet is bytes32 r = readBytes32(eip712Signature, 1); bytes32 s = readBytes32(eip712Signature, 33); address recoveredAddress = ecrecover(hash, v, r, s); - isValid = walletOwner == recoveredAddress; + isValid = WALLET_OWNER == recoveredAddress; return isValid; } } -- cgit v1.2.3