Skip to content

Commit

Permalink
fix: unsupport chain crash (#3373)
Browse files Browse the repository at this point in the history
  • Loading branch information
zhouhanseng authored Jun 15, 2021
1 parent 54e6a24 commit de35b01
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import type { Asset } from '../types'
export function useAssetsMerged(...listOfTokens: Asset[][]) {
const chainId = useChainId()
const NATIVE_TOKEN_ADDRESS = useConstant(CONSTANTS, 'NATIVE_TOKEN_ADDRESS')
if (!NATIVE_TOKEN_ADDRESS) return []
return uniqBy(
listOfTokens.flatMap((x) => x),
(x) => `${x.chain}_${formatEthereumAddress(x.token.address)}`,
Expand Down

0 comments on commit de35b01

Please sign in to comment.