Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: audit N-08 #279

Merged
merged 2 commits into from
Feb 10, 2025
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion src/AAFactory.sol
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ contract AAFactory {
address public immutable beacon;

/// @notice A mapping from unique account IDs to their corresponding deployed account addresses.
mapping(string => address) public accountMappings;
mapping(string accountId => address deployedAccount) public accountMappings;

/// @notice Constructor that initializes the factory with a beacon proxy bytecode hash and implementation contract address.
/// @param _beaconProxyBytecodeHash The bytecode hash of the beacon proxy.
Expand Down
6 changes: 2 additions & 4 deletions src/validators/SessionKeyValidator.sol
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,9 @@ contract SessionKeyValidator is IModuleValidator {
event SessionCreated(address indexed account, bytes32 indexed sessionHash, SessionLib.SessionSpec sessionSpec);
event SessionRevoked(address indexed account, bytes32 indexed sessionHash);

// account => number of open sessions
// NOTE: expired sessions are still counted if not explicitly revoked
mapping(address => uint256) private sessionCounter;
// session hash => session state
mapping(bytes32 => SessionLib.SessionStorage) private sessions;
mapping(address account => uint256 nOpenSessions) private sessionCounter;
mapping(bytes32 sessionHash => SessionLib.SessionStorage sessionState) private sessions;

/// @notice Get the session state for an account
/// @param account The account to fetch the session state for
Expand Down