Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ contract MessageEmitter is ITypeAndVersion {

function getMessage(address emitter, uint256 timestamp) public view returns (string memory) {
bytes32 key = _hashKey(emitter, timestamp);
require(bytes(s_messages[key]).length == 0, "Message does not exist for the given sender and timestamp");
require(bytes(s_messages[key]).length > 0, "Message does not exist for the given sender and timestamp");
return s_messages[key];
}

Expand All @@ -40,4 +40,4 @@ contract MessageEmitter is ITypeAndVersion {
function _hashKey(address emitter, uint256 timestamp) internal pure returns (bytes32) {
return keccak256(abi.encode(emitter, timestamp));
}
}
}
Loading