aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGreg Hysen <greg.hysen@gmail.com>2018-06-21 04:50:11 +0800
committerGreg Hysen <greg.hysen@gmail.com>2018-06-21 04:54:39 +0800
commit12e16d532bd1844b561a5c1d32fc1c9b1fae2efc (patch)
tree33edcf2d9039d07c78976cf712031c2da2a1f035
parent7814a391d8698f0b865d5f2675b9cc068eeab986 (diff)
downloaddexon-sol-tools-12e16d532bd1844b561a5c1d32fc1c9b1fae2efc.tar
dexon-sol-tools-12e16d532bd1844b561a5c1d32fc1c9b1fae2efc.tar.gz
dexon-sol-tools-12e16d532bd1844b561a5c1d32fc1c9b1fae2efc.tar.bz2
dexon-sol-tools-12e16d532bd1844b561a5c1d32fc1c9b1fae2efc.tar.lz
dexon-sol-tools-12e16d532bd1844b561a5c1d32fc1c9b1fae2efc.tar.xz
dexon-sol-tools-12e16d532bd1844b561a5c1d32fc1c9b1fae2efc.tar.zst
dexon-sol-tools-12e16d532bd1844b561a5c1d32fc1c9b1fae2efc.zip
Renamed constants in test wallet/validator
-rw-r--r--packages/contracts/src/contracts/current/test/TestValidator/TestValidator.sol12
-rw-r--r--packages/contracts/src/contracts/current/test/TestWallet/TestWallet.sol10
2 files changed, 11 insertions, 11 deletions
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;
}
}