diff --git a/nft_ingester/src/error/mod.rs b/nft_ingester/src/error/mod.rs index 46bd678f4..9ca8fa62c 100644 --- a/nft_ingester/src/error/mod.rs +++ b/nft_ingester/src/error/mod.rs @@ -56,6 +56,8 @@ pub enum IngesterError { TryFromInt(#[from] std::num::TryFromIntError), #[error("Chrono FixedOffset Error")] ChronoFixedOffset, + #[error("parse public")] + ParsePublic(#[from] solana_sdk::pubkey::ParsePubkeyError), } impl From for IngesterError { diff --git a/nft_ingester/src/program_transformers/bubblegum/db.rs b/nft_ingester/src/program_transformers/bubblegum/db.rs index 73c7bb07c..0ba66299f 100644 --- a/nft_ingester/src/program_transformers/bubblegum/db.rs +++ b/nft_ingester/src/program_transformers/bubblegum/db.rs @@ -8,6 +8,7 @@ use sea_orm::{ query::*, sea_query::OnConflict, ActiveModelTrait, ActiveValue::Set, ColumnTrait, DbBackend, EntityTrait, }; +use solana_sdk::pubkey::Pubkey; use spl_account_compression::events::ChangeLogEventV1; use std::convert::From; @@ -53,10 +54,12 @@ where tree_transaction.save(txn).await?; } else { + let tree = Pubkey::try_from(txn_id)?; + let tree_transaction = tree_transactions::ActiveModel { signature: Set(txn_id.to_string()), slot: Set(i64::try_from(slot)?), - tree: Set(tree_id.to_vec()), + tree: Set(tree.to_string()), processed_at: Set(Some(now)), ..Default::default() };