Skip to content

Commit 2ac6106

Browse files
committed
fix(pages): pr comment
1 parent 4cfa055 commit 2ac6106

File tree

4 files changed

+8
-17
lines changed

4 files changed

+8
-17
lines changed

src/lib/pages/evm-contract-details/components/EvmContractDetailsOverview.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import { EvmContractDetailsTxs } from "./EvmContractDetailsTxs";
2020

2121
interface EvmContractDetailsOverviewProps {
2222
contractAddressBech: BechAddr20;
23-
contractAddress: HexAddr20;
23+
contractAddressHex: HexAddr20;
2424
hash: Option<string>;
2525
evmHash: Nullish<string>;
2626
sender: Option<BechAddr>;
@@ -34,7 +34,7 @@ interface EvmContractDetailsOverviewProps {
3434

3535
export const EvmContractDetailsOverview = ({
3636
contractAddressBech,
37-
contractAddress,
37+
contractAddressHex,
3838
hash,
3939
evmHash,
4040
sender,
@@ -52,7 +52,7 @@ export const EvmContractDetailsOverview = ({
5252
return (
5353
<Stack gap={8}>
5454
{/* // TODO: Support all status */}
55-
<NotVerifiedDetails contractAddress={contractAddress} />
55+
<NotVerifiedDetails contractAddress={contractAddressHex} />
5656
<Stack gap={4}>
5757
<Grid
5858
gridTemplateColumns={{

src/lib/pages/evm-contract-details/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ const EvmContractDetailsBody = ({
127127
<TabPanel p={0} pt={8}>
128128
<EvmContractDetailsOverview
129129
contractAddressBech={contractAddressBechAddr}
130-
contractAddress={contractAddress}
130+
contractAddressHex={contractAddress}
131131
hash={evmContractInfoData?.hash}
132132
evmHash={evmHash}
133133
sender={evmContractInfoData?.sender}

src/lib/pages/evm-contract-verify/index.tsx

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,8 @@ import { useForm } from "react-hook-form";
1515
import {
1616
EvmContractVerifyForm,
1717
EvmProgrammingLanguage,
18-
LicenseType,
1918
VerificationOptions,
2019
zEvmContractVerifyForm,
21-
zEvmContractVerifyOptionForm,
2220
} from "./types";
2321
import { zodResolver } from "@hookform/resolvers/zod";
2422
import { truncate } from "lib/utils";
@@ -59,15 +57,15 @@ export const EvmContractVerify = () => {
5957
() => [
6058
{
6159
label: "1. No License (None)",
62-
value: LicenseType.NoLicense,
60+
value: "no-license",
6361
},
6462
{
6563
label: "2. The Unlicense (Unlicense)",
66-
value: LicenseType.TheUnLicense,
64+
value: "the-unlicense",
6765
},
6866
{
6967
label: "3. MIT License (MIT)",
70-
value: LicenseType.MIT,
68+
value: "mit",
7169
},
7270
],
7371
[]

src/lib/pages/evm-contract-verify/types.ts

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,6 @@
11
import { zHexAddr20 } from "lib/types";
22
import { z } from "zod";
33

4-
// TODO: Add more license types
5-
export enum LicenseType {
6-
NoLicense = "no-license",
7-
TheUnLicense = "the-unlicense",
8-
MIT = "mit",
9-
}
10-
114
export enum EvmProgrammingLanguage {
125
Solidity = "solidity",
136
Vyper = "vyper",
@@ -75,7 +68,7 @@ export const zEvmContractVerifyOptionForm = z.union([
7568

7669
export const zEvmContractAddressAndLicenseForm = z.object({
7770
contractAddress: zHexAddr20,
78-
licenseType: z.nativeEnum(LicenseType),
71+
licenseType: z.string().refine((val) => val !== ""),
7972
language: z.nativeEnum(EvmProgrammingLanguage),
8073
compilerVersion: z.string().refine((val) => val !== ""),
8174
});

0 commit comments

Comments
 (0)