Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
F
frontend
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
vicotor
frontend
Commits
6e965de6
Commit
6e965de6
authored
Jan 27, 2023
by
tom
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixes
parent
860e688e
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
19 additions
and
5 deletions
+19
-5
semanticTokens.ts
theme/foundations/semanticTokens.ts
+4
-0
ContractWriteResultDumb.tsx
ui/address/contract/ContractWriteResultDumb.tsx
+1
-1
ContractVerificationForm.tsx
ui/contractVerification/ContractVerificationForm.tsx
+0
-1
ContractVerificationFieldLibraryItem.tsx
...ification/fields/ContractVerificationFieldLibraryItem.tsx
+2
-0
ContractVerificationFieldName.tsx
...ractVerification/fields/ContractVerificationFieldName.tsx
+1
-0
ContractVerificationFieldOptimization.tsx
...fication/fields/ContractVerificationFieldOptimization.tsx
+1
-0
ContractVerificationFieldSources.tsx
...tVerification/fields/ContractVerificationFieldSources.tsx
+8
-1
ContractVerification.tsx
ui/pages/ContractVerification.tsx
+1
-1
TxDetails.tsx
ui/tx/TxDetails.tsx
+1
-1
No files found.
theme/foundations/semanticTokens.ts
View file @
6e965de6
...
...
@@ -15,6 +15,10 @@ const semanticTokens = {
link_hovered
:
{
'
default
'
:
'
blue.400
'
,
},
error
:
{
'
default
'
:
'
red.400
'
,
_dark
:
'
red.300
'
,
},
},
};
...
...
ui/address/contract/ContractWriteResultDumb.tsx
View file @
6e965de6
...
...
@@ -85,7 +85,7 @@ const ContractWriteResultDumb = ({ result, onSettle, txInfo }: Props) => {
alignItems=
"center"
whiteSpace=
"pre-wrap"
wordBreak=
"break-all"
color=
{
txInfo
.
status
===
'
error
'
||
isErrorResult
?
'
red.600
'
:
undefined
}
color=
{
txInfo
.
status
===
'
error
'
||
isErrorResult
?
'
error
'
:
undefined
}
>
{
content
}
</
Box
>
...
...
ui/contractVerification/ContractVerificationForm.tsx
View file @
6e965de6
...
...
@@ -59,7 +59,6 @@ const ContractVerificationForm = () => {
size=
"lg"
type=
"submit"
mt=
{
12
}
isDisabled=
{
!
formState
.
isValid
||
!
formState
.
isDirty
}
isLoading=
{
formState
.
isSubmitting
}
loadingText=
"Verify & publish"
>
...
...
ui/contractVerification/fields/ContractVerificationFieldLibraryItem.tsx
View file @
6e965de6
...
...
@@ -37,6 +37,7 @@ const ContractVerificationFieldLibraryItem = ({ control, index, fieldsLength, on
required
isInvalid=
{
Boolean
(
error
?.
name
)
}
maxLength=
{
255
}
autoComplete=
"off"
/>
<
InputPlaceholder
text=
"Library name (.sol file)"
error=
{
error
?.
name
}
/>
</
FormControl
>
...
...
@@ -50,6 +51,7 @@ const ContractVerificationFieldLibraryItem = ({ control, index, fieldsLength, on
{
...
field
}
isInvalid=
{
Boolean
(
error
?.
address
)
}
required
autoComplete=
"off"
/>
<
InputPlaceholder
text=
"Library address (0x...)"
error=
{
error
?.
address
}
/>
</
FormControl
>
...
...
ui/contractVerification/fields/ContractVerificationFieldName.tsx
View file @
6e965de6
...
...
@@ -27,6 +27,7 @@ const ContractVerificationFieldName = ({ hint }: Props) => {
isInvalid=
{
Boolean
(
error
)
}
maxLength=
{
255
}
isDisabled=
{
formState
.
isSubmitting
}
autoComplete=
"off"
/>
<
InputPlaceholder
text=
"Contract name"
error=
{
error
}
/>
</
FormControl
>
...
...
ui/contractVerification/fields/ContractVerificationFieldOptimization.tsx
View file @
6e965de6
...
...
@@ -35,6 +35,7 @@ const ContractVerificationFieldOptimization = () => {
required
maxLength=
{
255
}
isDisabled=
{
formState
.
isSubmitting
}
autoComplete=
"off"
/>
<
InputPlaceholder
text=
"Optimization runs"
/>
</
FormControl
>
...
...
ui/contractVerification/fields/ContractVerificationFieldSources.tsx
View file @
6e965de6
...
...
@@ -21,6 +21,8 @@ interface Props {
const
ContractVerificationFieldSources
=
({
accept
,
multiple
,
title
,
className
,
hint
}:
Props
)
=>
{
const
{
setValue
,
getValues
,
control
,
formState
}
=
useFormContext
<
FormFields
>
();
const
error
=
'
sources
'
in
formState
.
errors
?
formState
.
errors
.
sources
:
undefined
;
const
handleFileRemove
=
React
.
useCallback
((
index
?:
number
)
=>
{
if
(
index
===
undefined
)
{
return
;
...
...
@@ -57,8 +59,13 @@ const ContractVerificationFieldSources = ({ accept, multiple, title, className,
</
Button
>
</
FileInput
>
{
field
.
value
&&
field
.
value
.
length
>
0
&&
renderFiles
(
field
.
value
)
}
{
error
&&
(
<
Box
fontSize=
"sm"
mt=
{
2
}
color=
"error"
>
{
error
.
type
===
'
required
'
?
'
Field is required
'
:
error
.
message
}
</
Box
>
)
}
</>
),
[
accept
,
multiple
,
renderFiles
]);
),
[
accept
,
error
,
multiple
,
renderFiles
]);
return
(
<>
...
...
ui/pages/ContractVerification.tsx
View file @
6e965de6
...
...
@@ -26,7 +26,7 @@ const ContractVerification = () => {
<
PageTitle
text=
"New smart contract verification"
backLinkUrl=
{
hasGoBackLink
?
referrer
:
undefined
}
backLinkLabel=
"Back to
address
"
backLinkLabel=
"Back to
contract
"
/>
{
hash
&&
(
<
Address
>
...
...
ui/tx/TxDetails.tsx
View file @
6e965de6
...
...
@@ -99,7 +99,7 @@ const TxDetails = () => {
const
executionFailedBadge
=
toAddress
.
is_contract
&&
Boolean
(
data
.
status
)
&&
data
.
result
!==
'
success
'
?
(
<
Tooltip
label=
"Error occurred during contract execution"
>
<
chakra
.
span
display=
"inline-flex"
ml=
{
2
}
mr=
{
1
}
>
<
Icon
as=
{
errorIcon
}
boxSize=
{
4
}
color=
"
red.500
"
cursor=
"pointer"
/>
<
Icon
as=
{
errorIcon
}
boxSize=
{
4
}
color=
"
error
"
cursor=
"pointer"
/>
</
chakra
.
span
>
</
Tooltip
>
)
:
null
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment