fix(wallet): Consider ERC1155 as NFT (#15365)

This commit is contained in:
Cuteivist 2024-07-02 14:22:05 +02:00 committed by GitHub
parent 1d3c1e7da5
commit c1cc74750f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 6 additions and 3 deletions

View File

@ -205,7 +205,10 @@ QtObject:
read = getChainId
proc getIsNFT*(self: ActivityEntry): bool {.slot.} =
return self.metadata.transferType.isSome() and self.metadata.transferType.unsafeGet() == TransferType.Erc721
if self.metadata.transferType.isNone():
return false
let transferType = self.metadata.transferType.unsafeGet()
return transferType == TransferType.Erc721 or transferType == TransferType.Erc1155
QtProperty[bool] isNFT:
read = getIsNFT

View File

@ -19,7 +19,7 @@ type
Address
Decimals
Image
# Native, Erc20, Erc721
# Native, Erc20, Erc721, Erc1155
Type
# only be valid if source is custom
CommunityId

View File

@ -18,7 +18,7 @@ type
AddressPerChain
Decimals
Image
# Native, Erc20, Erc721
# Native, Erc20, Erc721, Erc1155
Type
# only be valid if source is custom
CommunityId