Commit aeeb3a24 authored by cartcrom's avatar cartcrom Committed by GitHub

fix: show blocked tokens warning (#4954)

shows blocked warning
parent 3586a288
...@@ -179,16 +179,17 @@ export default function TokenDetails() { ...@@ -179,16 +179,17 @@ export default function TokenDetails() {
isNative={isNative} isNative={isNative}
/> />
)} )}
</>
)}
{tokenAddress && (
<TokenSafetyModal <TokenSafetyModal
isOpen={isBlockedToken || !!continueSwap} isOpen={isBlockedToken || !!continueSwap}
tokenAddress={tokenQueryData.address} tokenAddress={tokenAddress}
onContinue={() => onResolveSwap(true)} onContinue={() => onResolveSwap(true)}
onBlocked={() => navigate(-1)} onBlocked={() => navigate(-1)}
onCancel={() => onResolveSwap(false)} onCancel={() => onResolveSwap(false)}
showCancel={true} showCancel={true}
/> />
</>
)} )}
</TokenDetailsLayout> </TokenDetailsLayout>
</Trace> </Trace>
......
...@@ -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(() => {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment