Skip to content
This repository has been archived by the owner on Dec 26, 2024. It is now read-only.

Commit

Permalink
chore: Remove unused submodule and update passkey module creation logic
Browse files Browse the repository at this point in the history
  • Loading branch information
imduchuyyy committed Jun 26, 2024
1 parent f1f21c2 commit a47df92
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 11 deletions.
3 changes: 0 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,3 @@
[submodule "lib/openzeppelin-contracts"]
path = lib/openzeppelin-contracts
url = https://github.com/openzeppelin/openzeppelin-contracts
[submodule "lib/webauthn-sol"]
path = lib/webauthn-sol
url = https://github.com/base-org/webauthn-sol
1 change: 0 additions & 1 deletion lib/webauthn-sol
Submodule webauthn-sol deleted from 619f20
10 changes: 3 additions & 7 deletions src/WalletFactory.sol
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,8 @@ contract WalletFactory is IWalletFactory {
return Wallet(walletAddress);
}

// Only create new passkey module not return exited module
function _createPasskeyModule(uint256 x, uint256 y, bytes32 salt) internal returns (PasskeyModule) {
address passkeyModuleAddress = getPasskeyAddress(salt);
if (passkeyModuleAddress.code.length > 0) {
return PasskeyModule(passkeyModuleAddress);
}

PasskeyModule passkeyModule = new PasskeyModule{salt: salt}();
passkeyModule.initialize(x, y);
return passkeyModule;
Expand Down Expand Up @@ -79,7 +75,7 @@ contract WalletFactory is IWalletFactory {
return payable(
Create2.computeAddress(
salt,
keccak256(type(CustomERC1967).creationCode)
getWalletCreationCodeHash()
)
);
}
Expand All @@ -88,7 +84,7 @@ contract WalletFactory is IWalletFactory {
return payable(
Create2.computeAddress(
salt,
keccak256(type(PasskeyModule).creationCode)
getPasskeyModuleCreationCodeHash()
)
);
}
Expand Down

0 comments on commit a47df92

Please sign in to comment.