From dc23af7ba65656ff099db309df199c2c34ca392e Mon Sep 17 00:00:00 2001 From: Nagaprasadvr Date: Tue, 7 Jan 2025 13:52:33 +0530 Subject: [PATCH] cleanup --- .../src/programs/token_extensions/mod.rs | 1 - .../src/token_extensions/mod.rs | 17 +++++++---------- 2 files changed, 7 insertions(+), 11 deletions(-) diff --git a/blockbuster/src/programs/token_extensions/mod.rs b/blockbuster/src/programs/token_extensions/mod.rs index faf12b71..6272f96b 100644 --- a/blockbuster/src/programs/token_extensions/mod.rs +++ b/blockbuster/src/programs/token_extensions/mod.rs @@ -66,7 +66,6 @@ impl MintAccountExtensions { pub fn is_some(&self) -> bool { self.default_account_state.is_some() || self.confidential_transfer_mint.is_some() - || self.confidential_transfer_account.is_some() || self.confidential_transfer_fee_config.is_some() || self.interest_bearing_config.is_some() || self.transfer_fee_config.is_some() diff --git a/program_transformers/src/token_extensions/mod.rs b/program_transformers/src/token_extensions/mod.rs index 498a4aed..b6878301 100644 --- a/program_transformers/src/token_extensions/mod.rs +++ b/program_transformers/src/token_extensions/mod.rs @@ -16,7 +16,6 @@ use { token_accounts, tokens::{self, IsNonFungible as IsNonFungibleModel}, }, - futures::TryFutureExt, sea_orm::{ entity::ActiveValue, query::QueryTrait, sea_query::query::OnConflict, ConnectionTrait, DatabaseConnection, DatabaseTransaction, DbBackend, DbErr, EntityTrait, Set, @@ -198,15 +197,13 @@ pub async fn handle_token_extensions_program_account<'a, 'b, 'c>( txn.commit().await?; if let Some(metadata) = &extensions.metadata { - upsert_asset_data(metadata, account_key.clone(), slot, db) - .map_ok(|i| { - i.map(|info| async move { - download_metadata_notifier(info).await.map_err(|e| { - ProgramTransformerError::DownloadMetadataNotify(e.into()) - }) - }) - }) - .await?; + if let Some(info) = + upsert_asset_data(metadata, account_key.clone(), slot, db).await? + { + download_metadata_notifier(info) + .await + .map_err(ProgramTransformerError::DownloadMetadataNotify)?; + } } Ok(())