Update nssa/program_methods/guest/src/bin/token.rs

Co-authored-by: Daniil Polyakov <arjentix@gmail.com>
This commit is contained in:
jonesmarvin8 2025-12-22 18:26:19 -05:00 committed by GitHub
parent c49a3afec7
commit ca7cc10f7c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -153,18 +153,10 @@ impl TokenDefinition {
metadata_id: metadata_id.clone(), metadata_id: metadata_id.clone(),
}); });
if account_type == //NFTs must have supply 1 match account_type {
TOKEN_STANDARD_NONFUNGIBLE TOKEN_STANDARD_NONFUNGIBLE if total_supply != 1
&& total_supply != 1 | TOKEN_STANDARD_FUNGIBLE_TOKEN if metadata_id != AccountId::new([0; 32]) => None
{ _ => this
None
} else if account_type == //Fungible Tokens do not have metadata.
TOKEN_STANDARD_FUNGIBLE_TOKEN
&& metadata_id != AccountId::new([0; 32])
{
None
} else {
this
} }
} }
} }