Skip to content

Commit

Permalink
fix: cleanup unused imports
Browse files Browse the repository at this point in the history
Also type the hash correctly, since again the ethers type signature is
confused with the smart account class
  • Loading branch information
cpb8010 committed Jan 13, 2025
1 parent 8e68c0a commit 48f76c4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/validators/WebAuthValidator.sol
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ contract WebAuthValidator is VerifierCaller, IModuleValidator {
function validateTransaction(
bytes32 signedHash,
bytes calldata signature,
Transaction calldata transaction
Transaction calldata
) external view returns (bool) {
return webAuthVerify(signedHash, signature);
}
Expand Down
8 changes: 4 additions & 4 deletions test/PasskeyModule.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ import { AsnParser } from "@peculiar/asn1-schema";
import { bigintToBuf, bufToBigint } from "bigint-conversion";
import { assert, expect } from "chai";
import * as hre from "hardhat";
import { SmartAccount, utils, Wallet } from "zksync-ethers";
import { SmartAccount, Wallet } from "zksync-ethers";

import { SsoAccount__factory, WebAuthValidator, WebAuthValidator__factory } from "../typechain-types";
import { ContractFixtures, getProvider, getWallet, LOCAL_RICH_WALLETS, logInfo, RecordedResponse } from "./utils";
import { base64UrlToUint8Array } from "zksync-sso/utils";
import { encodeAbiParameters, Hex, hexToBytes, toBytes, toHex } from "viem";
import { encodeAbiParameters, Hex, hexToBytes, toHex } from "viem";
import { randomBytes } from "crypto";
import { AbiCoder, parseEther, ZeroAddress } from "ethers";
import { parseEther, ZeroAddress } from "ethers";

/**
* Decode from a Base64URL-encoded string to an ArrayBuffer. Best used when converting a
Expand Down Expand Up @@ -504,7 +504,7 @@ describe("Passkey validation", function () {
const { sampleDomain, proxyAccountAddress, generatedR1Key, passKeyModuleAddress } = await deployAccount();

const sessionAccount = new SmartAccount({
payloadSigner: async (hash) => {
payloadSigner: async (hash: Hex) => {
const sampleClientObject = {
type: "webauthn.get",
challenge: fromBuffer(hexToBytes(hash)),
Expand Down

0 comments on commit 48f76c4

Please sign in to comment.