From b9ffbd7def56c4db96d4b4a416a9bb05a88fa992 Mon Sep 17 00:00:00 2001 From: Abdul Basit Date: Mon, 2 Oct 2023 07:10:21 +0500 Subject: [PATCH] return if compression leaf not found --- indexer/src/processor.rs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/indexer/src/processor.rs b/indexer/src/processor.rs index b6531dd..71bc0f2 100644 --- a/indexer/src/processor.rs +++ b/indexer/src/processor.rs @@ -135,9 +135,12 @@ impl Processor { let asset_id = get_asset_id(&merkle_tree, tkn_instruction.nonce); let compression_leaf = - CompressionLeaf::find_by_asset_id(conn, asset_id.to_string()) - .await? - .context("compression leaf not found")?; + CompressionLeaf::find_by_asset_id(conn, asset_id.to_string()).await?; + + if compression_leaf.is_none() { + return Ok(()); + } + let compression_leaf = compression_leaf.context("Compression leaf not found")?; let collection_mint_id = compression_leaf.id; let leaf_owner = compression_leaf.leaf_owner.clone();