Skip to content

Commit

Permalink
fix(protocol): fix isSignalSent bug (taikoxyz#15970)
Browse files Browse the repository at this point in the history
  • Loading branch information
dantaik authored Feb 21, 2024
1 parent bb8aaf4 commit c001cfb
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/protocol/contracts/signal/SignalService.sol
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ contract SignalService is EssentialContract, ISignalService {
mapping(address => bool) public isAuthorized; // slot 2
uint256[48] private __gap;

event SignalSent(address app, bytes32 signal, bytes32 slot, bytes32 value);
event Authorized(address indexed addr, bool authrized);

error SS_EMPTY_PROOF();
Expand Down Expand Up @@ -172,7 +173,7 @@ contract SignalService is EssentialContract, ISignalService {

/// @inheritdoc ISignalService
function isSignalSent(address app, bytes32 signal) public view returns (bool) {
return _loadSignalValue(app, signal) == signal;
return _loadSignalValue(app, signal) != 0;
}

/// @inheritdoc ISignalService
Expand Down Expand Up @@ -281,6 +282,7 @@ contract SignalService is EssentialContract, ISignalService {
assembly {
sstore(slot, value)
}
emit SignalSent(app, signal, slot, value);
}

function _cacheChainData(
Expand Down

0 comments on commit c001cfb

Please sign in to comment.