From 47628487f8ba83c6b26c8a221d128a7b88c8bb8f Mon Sep 17 00:00:00 2001 From: AhzamAkhtar Date: Sun, 24 Nov 2024 15:57:08 +0530 Subject: [PATCH] update --- digital_asset_types/src/dao/mod.rs | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/digital_asset_types/src/dao/mod.rs b/digital_asset_types/src/dao/mod.rs index c218d092c..3571f00a0 100644 --- a/digital_asset_types/src/dao/mod.rs +++ b/digital_asset_types/src/dao/mod.rs @@ -147,16 +147,16 @@ impl SearchAssetsQuery { if let Some(o) = self.owner_type.clone() { conditions = conditions.add(asset::Column::OwnerType.eq(o)); } else { - // By default, we ignore malformed tokens by ignoring tokens with supply=0 - // unless they are burnt. + // Default to NFTs // - // cNFTs keep supply=1 after they are burnt. - // Regular NFTs go to supply=0 after they are burnt. - conditions = conditions.add( - asset::Column::Supply - .ne(0) - .or(asset::Column::Burnt.eq(true)), - ) + // In theory, the owner_type=single check should be sufficient, + // however there is an old bug that has marked some non-NFTs as "single" with supply > 1. + // The supply check guarentees we do not include those. + conditions = conditions.add_option(Some( + asset::Column::OwnerType + .eq(OwnerType::Single) + .and(asset::Column::Supply.lte(1)), + )); } if let Some(c) = self.creator_address.to_owned() {