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
291f6cca
Commit
291f6cca
authored
Jun 29, 2023
by
tom
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix eslint
parent
691d0076
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
4 deletions
+4
-4
ContractMethodCallable.tsx
ui/address/contract/ContractMethodCallable.tsx
+2
-2
ContractRead.tsx
ui/address/contract/ContractRead.tsx
+1
-1
ContractWrite.tsx
ui/address/contract/ContractWrite.tsx
+1
-1
No files found.
ui/address/contract/ContractMethodCallable.tsx
View file @
291f6cca
...
@@ -20,7 +20,7 @@ interface ResultComponentProps<T extends SmartContractMethod> {
...
@@ -20,7 +20,7 @@ interface ResultComponentProps<T extends SmartContractMethod> {
interface
Props
<
T
extends
SmartContractMethod
>
{
interface
Props
<
T
extends
SmartContractMethod
>
{
data
:
T
;
data
:
T
;
onSubmit
:
(
data
:
T
,
args
:
Array
<
string
|
Array
<
unknown
>>
)
=>
Promise
<
ContractMethodCallResult
<
T
>>
;
onSubmit
:
(
data
:
T
,
args
:
Array
<
string
|
Array
<
unknown
>>
)
=>
Promise
<
ContractMethodCallResult
<
T
>>
;
R
esultComponent
:
(
props
:
ResultComponentProps
<
T
>
)
=>
JSX
.
Element
|
null
;
r
esultComponent
:
(
props
:
ResultComponentProps
<
T
>
)
=>
JSX
.
Element
|
null
;
isWrite
?:
boolean
;
isWrite
?:
boolean
;
}
}
...
@@ -61,7 +61,7 @@ const parseArrayValue = (value: string) => {
...
@@ -61,7 +61,7 @@ const parseArrayValue = (value: string) => {
}
}
};
};
const
ContractMethodCallable
=
<
T
extends
SmartContractMethod
>
(
{
data
,
onSubmit
,
ResultComponent
,
isWrite
}
: Props
<
T
>
) =
>
{
const
ContractMethodCallable
=
<
T
extends
SmartContractMethod
>
(
{
data
,
onSubmit
,
resultComponent
:
ResultComponent
,
isWrite
}
: Props
<
T
>
) =
>
{
const
[
result
,
setResult
]
=
React
.
useState
<
ContractMethodCallResult
<
T
>>
();
const
[
result
,
setResult
]
=
React
.
useState
<
ContractMethodCallResult
<
T
>>
();
const
[
isLoading
,
setLoading
]
=
React
.
useState
(
false
);
const
[
isLoading
,
setLoading
]
=
React
.
useState
(
false
);
...
...
ui/address/contract/ContractRead.tsx
View file @
291f6cca
...
@@ -74,7 +74,7 @@ const ContractRead = ({ addressHash, isProxy, isCustomAbi }: Props) => {
...
@@ -74,7 +74,7 @@ const ContractRead = ({ addressHash, isProxy, isCustomAbi }: Props) => {
key=
{
id
+
'
_
'
+
index
}
key=
{
id
+
'
_
'
+
index
}
data=
{
item
}
data=
{
item
}
onSubmit=
{
handleMethodFormSubmit
}
onSubmit=
{
handleMethodFormSubmit
}
R
esultComponent=
{
ContractReadResult
}
r
esultComponent=
{
ContractReadResult
}
/>
/>
);
);
},
[
handleMethodFormSubmit
]);
},
[
handleMethodFormSubmit
]);
...
...
ui/address/contract/ContractWrite.tsx
View file @
291f6cca
...
@@ -88,7 +88,7 @@ const ContractWrite = ({ addressHash, isProxy, isCustomAbi }: Props) => {
...
@@ -88,7 +88,7 @@ const ContractWrite = ({ addressHash, isProxy, isCustomAbi }: Props) => {
key=
{
id
+
'
_
'
+
index
}
key=
{
id
+
'
_
'
+
index
}
data=
{
item
}
data=
{
item
}
onSubmit=
{
handleMethodFormSubmit
}
onSubmit=
{
handleMethodFormSubmit
}
R
esultComponent=
{
ContractWriteResult
}
r
esultComponent=
{
ContractWriteResult
}
isWrite
isWrite
/>
/>
);
);
...
...
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