Skip to content

Commit

Permalink
Merge branch 'feat/fix-oz-code-inspector-issues' of https://github.co…
Browse files Browse the repository at this point in the history
…m/zkemail/ether-email-auth into feat/fix-oz-code-inspector-issues
  • Loading branch information
SoraSuegami committed Apr 29, 2024
2 parents 245b8d6 + a07122a commit d258d6c
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
14 changes: 8 additions & 6 deletions packages/contracts/test/helpers/DeploymentHelper.sol
Original file line number Diff line number Diff line change
Expand Up @@ -81,12 +81,14 @@ contract DeploymentHelper is Test {
SimpleWallet simpleWalletImpl = new SimpleWallet();
ERC1967Proxy simpleWalletProxy = new ERC1967Proxy(
address(simpleWalletImpl),
abi.encodeWithSelector(
simpleWalletImpl.initialize.selector,
signer,
address(verifier),
address(dkim),
address(emailAuthImpl)
abi.encodeCall(
simpleWalletImpl.initialize,
(
signer,
address(verifier),
address(dkim),
address(emailAuthImpl)
)
)
);
simpleWallet = SimpleWallet(payable(address(simpleWalletProxy)));
Expand Down
3 changes: 2 additions & 1 deletion packages/contracts/test/helpers/SimpleWallet.sol
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ pragma solidity ^0.8.12;

import {OwnableUpgradeable} from "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol";
import {EmailAccountRecovery} from "../../src/EmailAccountRecovery.sol";
import {Address} from "@openzeppelin/contracts/utils/Address.sol";

contract SimpleWallet is OwnableUpgradeable, EmailAccountRecovery {
enum GuardianStatus {
Expand Down Expand Up @@ -54,7 +55,7 @@ contract SimpleWallet is OwnableUpgradeable, EmailAccountRecovery {
uint256 amount
) public onlyNotRecoveringOwner {
require(address(this).balance >= amount, "insufficient balance");
payable(to).transfer(amount);
Address.sendValue(payable(to), amount);
}

function withdraw(uint256 amount) public onlyNotRecoveringOwner {
Expand Down
7 changes: 2 additions & 5 deletions packages/contracts/test/helpers/StructHelper.sol
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,8 @@ contract StructHelper is DeploymentHelper {

vm.mockCall(
address(verifier),
abi.encodeWithSelector(
Verifier.verifyEmailProof.selector,
emailProof
),
abi.encodeCall(Verifier.verifyEmailProof, (emailProof)),
abi.encode(true)
);
}
}
}

0 comments on commit d258d6c

Please sign in to comment.