Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
Nagaprasadvr committed Jan 7, 2025
1 parent daebc40 commit dc23af7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 11 deletions.
1 change: 0 additions & 1 deletion blockbuster/src/programs/token_extensions/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
17 changes: 7 additions & 10 deletions program_transformers/src/token_extensions/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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(())
Expand Down

0 comments on commit dc23af7

Please sign in to comment.