git.delta.rocks / unique-network / refs/commits / 871c90fdbf87

difftreelog

chore add note about non-existing NFT in XCM asset-instance convert

Daniel Shiposha2023-11-28parent: #0f77c10.patch.diff
in: master

1 file changed

modifiedpallets/foreign-assets/src/lib.rsdiffbeforeafterboth
276 ///276 ///
277 /// If the asset instance is not in the valid format or the `<token ID>` can't fit into the valid token ID,277 /// If the asset instance is not in the valid format or the `<token ID>` can't fit into the valid token ID,
278 /// `None` will be returned.278 /// `None` will be returned.
279 ///
280 /// Note: this function can return `Some` containing the token ID of a non-existing NFT.
279 fn local_asset_instance_to_token_id(asset_instance: &AssetInstance) -> Option<TokenId> {281 fn local_asset_instance_to_token_id(asset_instance: &AssetInstance) -> Option<TokenId> {
280 match asset_instance {282 match asset_instance {
281 AssetInstance::Index(token_id) => Some(TokenId((*token_id).try_into().ok()?)),283 AssetInstance::Index(token_id) => Some(TokenId((*token_id).try_into().ok()?)),