Skip to content

Commit

Permalink
consider new tuple elements
Browse files Browse the repository at this point in the history
  • Loading branch information
Larkooo committed Jan 31, 2025
1 parent b93d965 commit 9262af5
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions crates/torii/sqlite/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -581,8 +581,7 @@ impl Sql {
transaction_hash: Felt,
block_timestamp: u64,
) -> Result<()> {
let id = Argument::String(event_id
.to_string());
let id = Argument::String(event_id.to_string());
let keys = Argument::String(felts_to_sql_string(&event.keys));
let data = Argument::String(felts_to_sql_string(&event.data));
let hash = Argument::FieldElement(transaction_hash);
Expand Down Expand Up @@ -907,14 +906,10 @@ fn add_columns_recursive(
let mut new_path = path.to_vec();
new_path.push(idx.to_string());

if let Some(diff) = tuple_diff {
if diff.len() <= idx {
continue;
}
}

let member_diff = if let Some(diff) = tuple_diff {
if let Some((_, m)) = diff.iter().enumerate().find(|(i, _)| *i == idx) {
if let Some((_, m)) =
diff.iter().enumerate().find(|(i, _)| *i == idx && *i >= tuple.len())

Check warning on line 911 in crates/torii/sqlite/src/lib.rs

View check run for this annotation

Codecov / codecov/patch

crates/torii/sqlite/src/lib.rs#L909-L911

Added lines #L909 - L911 were not covered by tests
{
Some(m)

Check warning on line 913 in crates/torii/sqlite/src/lib.rs

View check run for this annotation

Codecov / codecov/patch

crates/torii/sqlite/src/lib.rs#L913

Added line #L913 was not covered by tests
} else {
continue;

Check warning on line 915 in crates/torii/sqlite/src/lib.rs

View check run for this annotation

Codecov / codecov/patch

crates/torii/sqlite/src/lib.rs#L915

Added line #L915 was not covered by tests
Expand Down

0 comments on commit 9262af5

Please sign in to comment.