diff --git a/src/verifier/UserOpWebAuthnCosignVerifier.sol b/src/verifier/UserOpWebAuthnCosignVerifier.sol index 6f57c33..b27a84f 100644 --- a/src/verifier/UserOpWebAuthnCosignVerifier.sol +++ b/src/verifier/UserOpWebAuthnCosignVerifier.sol @@ -39,9 +39,11 @@ contract UserOpWebAuthnCosignVerifier is IVerifier, OnlyKeystore { (address cosigner, bytes32 x, bytes32 y) = abi.decode(config, (address, bytes32, bytes32)); WebAuthn.WebAuthnAuth memory auth = WebAuthn.tryDecodeAuth(webauthnData); + + // Note: always run verification for both signatures in order to calculate accurate gas + // estimates during simulation with dummy signers. bool cosignValid = cosigner == ECDSA.recover(message, ecdsaSignature); bool webauthnValid = WebAuthn.verify(abi.encode(message), true, auth, x, y); - return (cosignValid && webauthnValid) ? SIG_VALIDATION_SUCCESS : SIG_VALIDATION_FAILED; } }