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 read = getChainId
proc getIsNFT*(self: ActivityEntry): bool {.slot.} = 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: QtProperty[bool] isNFT:
read = getIsNFT read = getIsNFT

View File

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

View File

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