Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
I
interface
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
LuckySwap
interface
Commits
aeeb3a24
Unverified
Commit
aeeb3a24
authored
Oct 18, 2022
by
cartcrom
Committed by
GitHub
Oct 18, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: show blocked tokens warning (#4954)
shows blocked warning
parent
3586a288
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
12 deletions
+15
-12
index.tsx
src/pages/TokenDetails/index.tsx
+10
-9
updater.ts
src/state/lists/updater.ts
+5
-3
No files found.
src/pages/TokenDetails/index.tsx
View file @
aeeb3a24
...
@@ -179,17 +179,18 @@ export default function TokenDetails() {
...
@@ -179,17 +179,18 @@ export default function TokenDetails() {
isNative=
{
isNative
}
isNative=
{
isNative
}
/>
/>
)
}
)
}
<
TokenSafetyModal
isOpen=
{
isBlockedToken
||
!!
continueSwap
}
tokenAddress=
{
tokenQueryData
.
address
}
onContinue=
{
()
=>
onResolveSwap
(
true
)
}
onBlocked=
{
()
=>
navigate
(
-
1
)
}
onCancel=
{
()
=>
onResolveSwap
(
false
)
}
showCancel=
{
true
}
/>
</>
</>
)
}
)
}
{
tokenAddress
&&
(
<
TokenSafetyModal
isOpen=
{
isBlockedToken
||
!!
continueSwap
}
tokenAddress=
{
tokenAddress
}
onContinue=
{
()
=>
onResolveSwap
(
true
)
}
onBlocked=
{
()
=>
navigate
(
-
1
)
}
onCancel=
{
()
=>
onResolveSwap
(
false
)
}
showCancel=
{
true
}
/>
)
}
</
TokenDetailsLayout
>
</
TokenDetailsLayout
>
</
Trace
>
</
Trace
>
)
)
...
...
src/state/lists/updater.ts
View file @
aeeb3a24
...
@@ -25,9 +25,11 @@ export default function Updater(): null {
...
@@ -25,9 +25,11 @@ export default function Updater(): null {
const
fetchList
=
useFetchListCallback
()
const
fetchList
=
useFetchListCallback
()
const
fetchAllListsCallback
=
useCallback
(()
=>
{
const
fetchAllListsCallback
=
useCallback
(()
=>
{
if
(
!
isWindowVisible
)
return
if
(
!
isWindowVisible
)
return
Object
.
keys
(
lists
).
forEach
((
url
)
=>
Object
.
keys
(
lists
).
forEach
((
url
)
=>
{
fetchList
(
url
).
catch
((
error
)
=>
console
.
debug
(
'
interval list fetching error
'
,
error
))
// Skip validation on unsupported lists
)
const
isUnsupportedList
=
UNSUPPORTED_LIST_URLS
.
includes
(
url
)
fetchList
(
url
,
false
,
isUnsupportedList
).
catch
((
error
)
=>
console
.
debug
(
'
interval list fetching error
'
,
error
))
})
},
[
fetchList
,
isWindowVisible
,
lists
])
},
[
fetchList
,
isWindowVisible
,
lists
])
useEffect
(()
=>
{
useEffect
(()
=>
{
...
...
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