|
|
@ -16,7 +16,6 @@ import { getConversionRate } from '../ducks/metamask/metamask'; |
|
|
|
|
|
|
|
|
|
|
|
import { getSwapsTokens } from '../ducks/swaps/swaps'; |
|
|
|
import { getSwapsTokens } from '../ducks/swaps/swaps'; |
|
|
|
import { isSwapsDefaultTokenSymbol } from '../../shared/modules/swaps.utils'; |
|
|
|
import { isSwapsDefaultTokenSymbol } from '../../shared/modules/swaps.utils'; |
|
|
|
import { toChecksumHexAddress } from '../../shared/modules/hexstring-utils'; |
|
|
|
|
|
|
|
import { useEqualityCheck } from './useEqualityCheck'; |
|
|
|
import { useEqualityCheck } from './useEqualityCheck'; |
|
|
|
|
|
|
|
|
|
|
|
const shuffledContractMap = shuffle( |
|
|
|
const shuffledContractMap = shuffle( |
|
|
@ -39,9 +38,9 @@ export function getRenderableTokenData( |
|
|
|
) { |
|
|
|
) { |
|
|
|
const { symbol, name, address, iconUrl, string, balance, decimals } = token; |
|
|
|
const { symbol, name, address, iconUrl, string, balance, decimals } = token; |
|
|
|
// token from dynamic api list is fetched when useTokenDetection is true
|
|
|
|
// token from dynamic api list is fetched when useTokenDetection is true
|
|
|
|
const tokenAddress = useTokenDetection |
|
|
|
// And since the token.address from allTokens is checksumaddress
|
|
|
|
? address |
|
|
|
// token Address have to be changed to lowercase when we are using dynamic list
|
|
|
|
: toChecksumHexAddress(address); |
|
|
|
const tokenAddress = useTokenDetection ? address?.toLowerCase() : address; |
|
|
|
const formattedFiat = |
|
|
|
const formattedFiat = |
|
|
|
getTokenFiatAmount( |
|
|
|
getTokenFiatAmount( |
|
|
|
isSwapsDefaultTokenSymbol(symbol, chainId) |
|
|
|
isSwapsDefaultTokenSymbol(symbol, chainId) |
|
|
|