Skip to content

Commit

Permalink
Update comments
Browse files Browse the repository at this point in the history
  • Loading branch information
adamegyed committed Jan 16, 2024
1 parent 1f2f770 commit 560b4e4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/plugins/session/SessionKeyPlugin.sol
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ contract SessionKeyPlugin is ISessionKeyPlugin, SessionKeyPermissions, BasePlugi
/// @inheritdoc ISessionKeyPlugin
function addSessionKey(address sessionKey, bytes32 tag) public override {
if (!_sessionKeys.tryAdd(msg.sender, CastLib.toSetValue(sessionKey))) {
// This check ensures no duplciate keys and that the session key is not the zero address.
// This check ensures no duplicate keys and that the session key is not the zero address.
revert InvalidSessionKey(sessionKey);
}

Expand Down Expand Up @@ -170,6 +170,7 @@ contract SessionKeyPlugin is ISessionKeyPlugin, SessionKeyPermissions, BasePlugi
revert InvalidSessionKey(oldSessionKey);
}

// If the new key to rotate into is a duplicate or the zero address, revert.
if (!_sessionKeys.tryAdd(msg.sender, CastLib.toSetValue(newSessionKey))) {
revert InvalidSessionKey(newSessionKey);
}
Expand Down

0 comments on commit 560b4e4

Please sign in to comment.