Merge pull request #268 from ArtemKolodko/erc1155_no_meta

Show erc1155 tokens without metadata
pull/269/head
Artem 2 years ago committed by GitHub
commit bf81dff70c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      src/pages/AddressPage/index.tsx
  2. 2
      src/pages/AddressPage/tabs/inventory/Inventory.tsx
  3. 8
      src/pages/AddressPage/tabs/inventory/InventoryItem.tsx

@ -166,7 +166,7 @@ export function AddressPage() {
} }
return item; return item;
}) })
.filter((item) => item.meta) // .filter((item) => item.meta)
.map((item) => { .map((item) => {
item.type = type; item.type = type;
return item; return item;

@ -49,7 +49,7 @@ export function Inventory(props: IInventoryProps) {
const { ownerAddress = '', tokenID, meta } = item const { ownerAddress = '', tokenID, meta } = item
const name = meta && meta.name ? meta.name.toLowerCase() : '' const name = meta && meta.name ? meta.name.toLowerCase() : ''
return ownerAddress.toLowerCase().includes(value) return (ownerAddress || '').toLowerCase().includes(value)
|| tokenID.toLowerCase().includes(value) || tokenID.toLowerCase().includes(value)
|| name.includes(value) || name.includes(value)
}) })

@ -124,8 +124,8 @@ export function InventoryItem(props: IInventoryItemProps) {
align={"center"} align={"center"}
> >
<Image src={HarmonyLogo} /> <Image src={HarmonyLogo} />
<Box style={{ position: 'absolute' }}> <Box style={{ position: 'absolute', bottom: '8px' }}>
<Text style={{ opacity: 0.7 }}>No Image</Text> <Text style={{ opacity: 0.5 }}>No Image</Text>
</Box> </Box>
</ErrorPreview> </ErrorPreview>
) : url ? ( ) : url ? (
@ -146,8 +146,8 @@ export function InventoryItem(props: IInventoryItemProps) {
align={"center"} align={"center"}
> >
<Image src={HarmonyLogo} /> <Image src={HarmonyLogo} />
<Box style={{ position: 'absolute' }}> <Box style={{ position: 'absolute', bottom: '8px' }}>
<Text style={{ opacity: 0.7 }}>No Image</Text> <Text style={{ opacity: 0.5 }}>No Image</Text>
</Box> </Box>
</EmptyPreview> </EmptyPreview>
)} )}

Loading…
Cancel
Save