Skip to content

Commit

Permalink
fix(backfiller): nft ingester need to be updated for saving tree tran…
Browse files Browse the repository at this point in the history
…sactions
  • Loading branch information
kespinola committed Dec 15, 2023
1 parent 9591066 commit 50fd51d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 2 additions & 0 deletions nft_ingester/src/error/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<reqwest::Error> for IngesterError {
Expand Down
5 changes: 4 additions & 1 deletion nft_ingester/src/program_transformers/bubblegum/db.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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()
};
Expand Down

0 comments on commit 50fd51d

Please sign in to comment.