We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 31796a8 commit 60bea75Copy full SHA for 60bea75
packages/nextjs/components/address-vision/ButtonsCard.tsx
@@ -8,6 +8,7 @@ import { usePublicClient } from "wagmi";
8
import { useAddressStore } from "~~/services/store/store";
9
10
const GNOSIS_SAFE_BYTECODE_PATTERN = "0x608060405273ffffffffffffffffffffffffffffffffffffffff600054167fa619486e";
11
+const EOF_SIGNATURE = "0xef01";
12
13
const SAFE_ABI = [
14
{
@@ -49,7 +50,7 @@ export const ButtonsCard = () => {
49
50
if (!address || !client) return;
51
try {
52
const bytecode = await client.getCode({ address });
- const isContract = bytecode && bytecode.length > 2;
53
+ const isContract = bytecode && bytecode.length > 2 && !bytecode.startsWith(EOF_SIGNATURE);
54
55
setIsContractAddress(isContract || false);
56
0 commit comments