Skip to content

Commit

Permalink
chore
Browse files Browse the repository at this point in the history
  • Loading branch information
nguyenhoaidanh committed Oct 17, 2023
1 parent 6bf3290 commit e43cbe7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
6 changes: 1 addition & 5 deletions src/components/SearchModal/CurrencySearch.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import Column from 'components/Column'
import InfoHelper from 'components/InfoHelper'
import { RowBetween } from 'components/Row'
import { KS_SETTING_API } from 'constants/env'
import { isEVM, isSolana } from 'constants/networks'
import { isEVM } from 'constants/networks'
import { Z_INDEXS } from 'constants/styles'
import { NativeCurrencies } from 'constants/tokens'
import { useActiveWeb3React } from 'hooks'
Expand Down Expand Up @@ -156,7 +156,6 @@ export function CurrencySearch({
const [searchQuery, setSearchQuery] = useState<string>('')
const debouncedQuery = useDebounce(searchQuery, 200)
const isQueryValidEVMAddress = isEVM(chainId) && !!isAddress(chainId, debouncedQuery)
const isQueryValidSolanaAddress = isSolana(chainId) && !!isAddress(chainId, debouncedQuery)

const { favoriteTokens, toggleFavoriteToken } = useUserFavoriteTokens(chainId)

Expand Down Expand Up @@ -346,8 +345,6 @@ export function CurrencySearch({
console.error('import token err', err)
})
}
} else if (tokens.length === 0 && isQueryValidSolanaAddress) {
// TODO: query tokens from Solana token db
}
} else {
tokens = Object.values(defaultTokens)
Expand All @@ -363,7 +360,6 @@ export function CurrencySearch({
defaultTokens,
fetchERC20TokenFromRPC,
isQueryValidEVMAddress,
isQueryValidSolanaAddress,
pageCount,
importTokensToKsSettings,
],
Expand Down
1 change: 1 addition & 0 deletions src/hooks/useLogin.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,7 @@ const useLogin = (autoLogin = false) => {

const redirectSignIn = useCallback(
(account: string) => {
if (window.location.pathname.startsWith(APP_PATHS.IAM_LOGIN)) return
setLoginRedirectUrl(window.location.href)
KyberOauth2.authenticate(isEVM ? { wallet_address: account } : {}) // navigate to login page
},
Expand Down

0 comments on commit e43cbe7

Please sign in to comment.