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
aecf6602
Commit
aecf6602
authored
Feb 13, 2023
by
tom
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix linting
parent
98d27309
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
5 deletions
+5
-5
ContractVerificationForm.tsx
ui/contractVerification/ContractVerificationForm.tsx
+1
-2
ContractVerification.tsx
ui/pages/ContractVerification.tsx
+4
-3
No files found.
ui/contractVerification/ContractVerificationForm.tsx
View file @
aecf6602
...
@@ -10,7 +10,6 @@ import type { SmartContractVerificationMethod, SmartContractVerificationConfig }
...
@@ -10,7 +10,6 @@ import type { SmartContractVerificationMethod, SmartContractVerificationConfig }
import
useApiFetch
from
'
lib/api/useApiFetch
'
;
import
useApiFetch
from
'
lib/api/useApiFetch
'
;
import
useToast
from
'
lib/hooks/useToast
'
;
import
useToast
from
'
lib/hooks/useToast
'
;
import
link
from
'
lib/link/link
'
;
import
useSocketChannel
from
'
lib/socket/useSocketChannel
'
;
import
useSocketChannel
from
'
lib/socket/useSocketChannel
'
;
import
useSocketMessage
from
'
lib/socket/useSocketMessage
'
;
import
useSocketMessage
from
'
lib/socket/useSocketMessage
'
;
...
@@ -88,7 +87,7 @@ const ContractVerificationForm = ({ method: methodFromQuery, config, hash }: Pro
...
@@ -88,7 +87,7 @@ const ContractVerificationForm = ({ method: methodFromQuery, config, hash }: Pro
variant
:
'
subtle
'
,
variant
:
'
subtle
'
,
isClosable
:
true
,
isClosable
:
true
,
onCloseComplete
:
()
=>
{
onCloseComplete
:
()
=>
{
router
.
push
(
link
(
'
address_index
'
,
{
id
:
hash
},
{
tab
:
'
contract
'
})
,
undefined
,
{
shallow
:
true
});
router
.
push
(
{
pathname
:
'
/address/[id]
'
,
query
:
{
id
:
hash
,
tab
:
'
contract
'
}
}
,
undefined
,
{
shallow
:
true
});
},
},
});
});
},
[
hash
,
router
,
setError
,
toast
]);
},
[
hash
,
router
,
setError
,
toast
]);
...
...
ui/pages/ContractVerification.tsx
View file @
aecf6602
...
@@ -7,6 +7,7 @@ import type { SmartContractVerificationConfigRaw, SmartContractVerificationMetho
...
@@ -7,6 +7,7 @@ import type { SmartContractVerificationConfigRaw, SmartContractVerificationMetho
import
useApiQuery
from
'
lib/api/useApiQuery
'
;
import
useApiQuery
from
'
lib/api/useApiQuery
'
;
import
{
useAppContext
}
from
'
lib/appContext
'
;
import
{
useAppContext
}
from
'
lib/appContext
'
;
import
isBrowser
from
'
lib/isBrowser
'
;
import
isBrowser
from
'
lib/isBrowser
'
;
import
getQueryParamString
from
'
lib/router/getQueryParamString
'
;
import
ContractVerificationForm
from
'
ui/contractVerification/ContractVerificationForm
'
;
import
ContractVerificationForm
from
'
ui/contractVerification/ContractVerificationForm
'
;
import
{
isValidVerificationMethod
,
sortVerificationMethods
}
from
'
ui/contractVerification/utils
'
;
import
{
isValidVerificationMethod
,
sortVerificationMethods
}
from
'
ui/contractVerification/utils
'
;
import
Address
from
'
ui/shared/address/Address
'
;
import
Address
from
'
ui/shared/address/Address
'
;
...
@@ -25,8 +26,8 @@ const ContractVerification = () => {
...
@@ -25,8 +26,8 @@ const ContractVerification = () => {
const
hasGoBackLink
=
referrer
&&
referrer
.
includes
(
'
/address
'
);
const
hasGoBackLink
=
referrer
&&
referrer
.
includes
(
'
/address
'
);
const
router
=
useRouter
();
const
router
=
useRouter
();
const
hash
=
router
.
query
.
id
?.
toString
(
);
const
hash
=
getQueryParamString
(
router
.
query
.
id
);
const
method
=
router
.
query
.
id
?.
toString
()
as
SmartContractVerificationMethod
|
undefine
d
;
const
method
=
getQueryParamString
(
router
.
query
.
method
)
as
SmartContractVerificationMetho
d
;
const
contractQuery
=
useApiQuery
(
'
contract
'
,
{
const
contractQuery
=
useApiQuery
(
'
contract
'
,
{
pathParams
:
{
id
:
hash
},
pathParams
:
{
id
:
hash
},
...
@@ -64,7 +65,7 @@ const ContractVerification = () => {
...
@@ -64,7 +65,7 @@ const ContractVerification = () => {
React
.
useEffect
(()
=>
{
React
.
useEffect
(()
=>
{
if
(
isVerifiedContract
)
{
if
(
isVerifiedContract
)
{
router
.
push
(
link
(
'
address_index
'
,
{
id
:
hash
},
{
tab
:
'
contract
'
})
,
undefined
,
{
scroll
:
false
,
shallow
:
true
});
router
.
push
(
{
pathname
:
'
/address/[id]
'
,
query
:
{
id
:
hash
,
tab
:
'
contract
'
}
}
,
undefined
,
{
scroll
:
false
,
shallow
:
true
});
}
}
},
[
hash
,
isVerifiedContract
,
router
]);
},
[
hash
,
isVerifiedContract
,
router
]);
...
...
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