From 25da0ef1937b53db0940e27701c1f15f28f1e884 Mon Sep 17 00:00:00 2001 From: Jenn Cooper Date: Tue, 25 Sep 2018 10:32:21 -0700 Subject: [PATCH] Overloaded functions causing issues in tests - See https://github.com/trufflesuite/truffle/issues/569 --- contracts/LocalizationPreferences.sol | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/contracts/LocalizationPreferences.sol b/contracts/LocalizationPreferences.sol index 09b5db0..e482d29 100644 --- a/contracts/LocalizationPreferences.sol +++ b/contracts/LocalizationPreferences.sol @@ -16,12 +16,8 @@ contract LocalizationPreferences { return true; } - function get(bytes32 _code) external view returns (bool, string) { - return get(_code, tx.origin); - } - // Primarily for testing - function get(bytes32 _code, address _who) public view returns (bool, string) { + function getFor(bytes32 _code, address _who) public view returns (bool, string) { string memory text = getLocalizationFor(_who).textFor(_code); if (keccak256(abi.encodePacked(text)) != empty_) { return (true, text); @@ -30,6 +26,10 @@ contract LocalizationPreferences { } } + function get(bytes32 _code) external view returns (bool, string) { + return getFor(_code, tx.origin); + } + function getLocalizationFor(address _who) internal view returns (Localization) { if (Localization(registry_[_who]) == Localization(0)) { return Localization(defaultLocalization);