From dc4c6b3f3635a60ebc6e1a7be9811ff5ada9df66 Mon Sep 17 00:00:00 2001 From: Derrick Hammer Date: Thu, 13 Jul 2023 13:17:27 -0400 Subject: [PATCH] fix: compare code against codehash --- src/client/verifyingProvider.ts | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/client/verifyingProvider.ts b/src/client/verifyingProvider.ts index 8251499..cb34419 100644 --- a/src/client/verifyingProvider.ts +++ b/src/client/verifyingProvider.ts @@ -640,10 +640,7 @@ export default class VerifyingProvider implements IClientVerifyingProvider { private verifyCodeHash(code: Bytes, codeHash: Bytes32): boolean { return ( (code === "0x" && codeHash === "0x" + KECCAK256_NULL_S) || - byteArrayEquals( - keccak256(fromHexString(codeHash)), - fromHexString(codeHash), - ) + byteArrayEquals(keccak256(fromHexString(code)), fromHexString(codeHash)) ); }