Skip to content

Commit

Permalink
chore: cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
Nagaprasadvr committed Nov 11, 2024
1 parent d1855e0 commit db11fd6
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion blockbuster/src/programs/token_account/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,6 @@ pub trait IsNonFungible {

impl IsNonFungible for Mint {
fn is_non_fungible(&self) -> bool {
self.decimals == 0 && self.mint_authority.is_none()
self.decimals == 0 && self.mint_authority.is_none() && self.supply == 1
}
}
2 changes: 1 addition & 1 deletion blockbuster/src/programs/token_extensions/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,6 @@ pub trait IsNonFungible {

impl IsNonFungible for Mint {
fn is_non_fungible(&self) -> bool {
self.decimals == 0 && self.mint_authority.is_none()
self.decimals == 0 && self.mint_authority.is_none() && self.supply == 1
}
}
2 changes: 1 addition & 1 deletion digital_asset_types/src/dao/generated/tokens.rs
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,6 @@ pub trait IsNonFungible {

impl IsNonFungible for Model {
fn is_non_fungible(&self) -> bool {
self.decimals == 0 && self.mint_authority.is_none()
self.decimals == 0 && self.mint_authority.is_none() && self.supply == 1.into()
}
}
4 changes: 2 additions & 2 deletions program_transformers/src/asset_upserts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@ pub async fn upsert_assets_mint_account_columns<T: ConnectionTrait + Transaction
let specification_asset_class = if is_non_fungible {
None
} else {
// If its not non-fungible then
// by default, we assume that the asset is fungibleToken and later update based on token metadata
// If token is not fungible then
// we assume that the asset is fungibleToken and later update based on token metadata
Some(SpecificationAssetClass::FungibleToken)
};

Expand Down

0 comments on commit db11fd6

Please sign in to comment.