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;
})
.filter((item) => item.meta)
// .filter((item) => item.meta)
.map((item) => {
item.type = type;
return item;

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

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

Loading…
Cancel
Save