File tree Expand file tree Collapse file tree 4 files changed +8
-17
lines changed Expand file tree Collapse file tree 4 files changed +8
-17
lines changed Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ import { EvmContractDetailsTxs } from "./EvmContractDetailsTxs";
20
20
21
21
interface EvmContractDetailsOverviewProps {
22
22
contractAddressBech : BechAddr20 ;
23
- contractAddress : HexAddr20 ;
23
+ contractAddressHex : HexAddr20 ;
24
24
hash : Option < string > ;
25
25
evmHash : Nullish < string > ;
26
26
sender : Option < BechAddr > ;
@@ -34,7 +34,7 @@ interface EvmContractDetailsOverviewProps {
34
34
35
35
export const EvmContractDetailsOverview = ( {
36
36
contractAddressBech,
37
- contractAddress ,
37
+ contractAddressHex ,
38
38
hash,
39
39
evmHash,
40
40
sender,
@@ -52,7 +52,7 @@ export const EvmContractDetailsOverview = ({
52
52
return (
53
53
< Stack gap = { 8 } >
54
54
{ /* // TODO: Support all status */ }
55
- < NotVerifiedDetails contractAddress = { contractAddress } />
55
+ < NotVerifiedDetails contractAddress = { contractAddressHex } />
56
56
< Stack gap = { 4 } >
57
57
< Grid
58
58
gridTemplateColumns = { {
Original file line number Diff line number Diff line change @@ -127,7 +127,7 @@ const EvmContractDetailsBody = ({
127
127
< TabPanel p = { 0 } pt = { 8 } >
128
128
< EvmContractDetailsOverview
129
129
contractAddressBech = { contractAddressBechAddr }
130
- contractAddress = { contractAddress }
130
+ contractAddressHex = { contractAddress }
131
131
hash = { evmContractInfoData ?. hash }
132
132
evmHash = { evmHash }
133
133
sender = { evmContractInfoData ?. sender }
Original file line number Diff line number Diff line change @@ -15,10 +15,8 @@ import { useForm } from "react-hook-form";
15
15
import {
16
16
EvmContractVerifyForm ,
17
17
EvmProgrammingLanguage ,
18
- LicenseType ,
19
18
VerificationOptions ,
20
19
zEvmContractVerifyForm ,
21
- zEvmContractVerifyOptionForm ,
22
20
} from "./types" ;
23
21
import { zodResolver } from "@hookform/resolvers/zod" ;
24
22
import { truncate } from "lib/utils" ;
@@ -59,15 +57,15 @@ export const EvmContractVerify = () => {
59
57
( ) => [
60
58
{
61
59
label : "1. No License (None)" ,
62
- value : LicenseType . NoLicense ,
60
+ value : "no-license" ,
63
61
} ,
64
62
{
65
63
label : "2. The Unlicense (Unlicense)" ,
66
- value : LicenseType . TheUnLicense ,
64
+ value : "the-unlicense" ,
67
65
} ,
68
66
{
69
67
label : "3. MIT License (MIT)" ,
70
- value : LicenseType . MIT ,
68
+ value : "mit" ,
71
69
} ,
72
70
] ,
73
71
[ ]
Original file line number Diff line number Diff line change 1
1
import { zHexAddr20 } from "lib/types" ;
2
2
import { z } from "zod" ;
3
3
4
- // TODO: Add more license types
5
- export enum LicenseType {
6
- NoLicense = "no-license" ,
7
- TheUnLicense = "the-unlicense" ,
8
- MIT = "mit" ,
9
- }
10
-
11
4
export enum EvmProgrammingLanguage {
12
5
Solidity = "solidity" ,
13
6
Vyper = "vyper" ,
@@ -75,7 +68,7 @@ export const zEvmContractVerifyOptionForm = z.union([
75
68
76
69
export const zEvmContractAddressAndLicenseForm = z . object ( {
77
70
contractAddress : zHexAddr20 ,
78
- licenseType : z . nativeEnum ( LicenseType ) ,
71
+ licenseType : z . string ( ) . refine ( ( val ) => val !== "" ) ,
79
72
language : z . nativeEnum ( EvmProgrammingLanguage ) ,
80
73
compilerVersion : z . string ( ) . refine ( ( val ) => val !== "" ) ,
81
74
} ) ;
You can’t perform that action at this time.
0 commit comments