Skip to content

Commit

Permalink
fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
leekt committed Apr 22, 2024
1 parent 8c639ed commit ca7ac08
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/signer/MultiSignatureSigner.sol
Original file line number Diff line number Diff line change
Expand Up @@ -23,23 +23,25 @@ struct ECDSAValidatorStorage {
contract MultiSignatureECDSASigner is SignerBase {
mapping(address => uint256) public usedIds;
mapping(bytes32 id => mapping(address wallet => address)) public signer;

event SignerRegistered(address indexed kernel, bytes32 indexed id, address indexed owner);

error NoSignerRegistered();

function isInitialized(address wallet) external view override returns (bool) {
return usedIds[wallet] > 0;
}

function _signerOninstall(bytes32 id, bytes calldata _data) internal override {
if(signer[id][msg.sender] == address(0)) {
if (signer[id][msg.sender] == address(0)) {
usedIds[msg.sender]++;
}
signer[id][msg.sender] = address(bytes20(_data[0:20]));
emit SignerRegistered(msg.sender, id, address(bytes20(_data[0:20])));
}

function _signerOnUninstall(bytes32 id, bytes calldata) internal override {
if(signer[id][msg.sender] == address(0)) {
if (signer[id][msg.sender] == address(0)) {
revert NoSignerRegistered();
}
delete signer[id][msg.sender];
Expand Down

0 comments on commit ca7ac08

Please sign in to comment.