Skip to content

Commit

Permalink
Merge pull request #67 from holaplex/abdul/fix-if-leaf-not-found
Browse files Browse the repository at this point in the history
return if compression leaf not found
  • Loading branch information
imabdulbasit authored Oct 2, 2023
2 parents e4dc9ca + b9ffbd7 commit 696b78e
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions indexer/src/processor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 696b78e

Please sign in to comment.