Skip to content

Commit

Permalink
Overloaded functions causing issues in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jenncoop committed Sep 25, 2018
1 parent b8bfe62 commit 25da0ef
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions contracts/LocalizationPreferences.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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);
Expand Down

0 comments on commit 25da0ef

Please sign in to comment.