Skip to content

Commit

Permalink
removed unneded ts test + several review suggestions
Browse files Browse the repository at this point in the history
Signed-off-by: Vadym Struts <[email protected]>
  • Loading branch information
vadimstruts committed Jul 8, 2024
1 parent 1d1d4d8 commit 02249fe
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 57 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,7 @@ export class BaseQueryCache {
}
return token.logo.startsWith('ipfs://')
? (await this.getIpfsGatewayTranslatedNftUrl(token.logo)) || ''
: `chrome://erc-token-images/${token.logo}`
: `chrome://erc-token-images/${token.logo}`
}

getEnabledCoinTypes = async () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -287,4 +287,4 @@ export const nftsEndpoints = ({
providesTags: ['SimpleHashSpamNFTs']
})
}
}
}

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -115,12 +115,19 @@ export function withPlaceholderIcon<
}
}, [needsPlaceholder, asset?.contractAddress, asset?.name])

const remoteImage = React.useMemo(() => {
if (isRemoteURL) {
return isStorybook ? tokenImageURL || '' : `chrome://image?${tokenImageURL}`
}
return ''
}, [isRemoteURL, tokenImageURL])

// render
if (!asset) {
return null
}

const icon = nativeAssetLogo || asset?.logo
const icon = nativeAssetLogo || (isRemoteURL ? remoteImage : asset?.logo)

if (needsPlaceholder || !icon) {
return (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import {

// hooks
import {
useGetIpfsGatewayTranslatedNftUrlQuery
useGetIpfsGatewayTranslatedNftUrlQuery //
} from '../../../common/slices/api.slice'

// styles
Expand Down

0 comments on commit 02249fe

Please sign in to comment.