From c29524ce25bba12b6e7e04c59070829a3ce58ca9 Mon Sep 17 00:00:00 2001 From: Larko <59736843+Larkooo@users.noreply.github.com> Date: Sun, 20 Oct 2024 22:58:05 -0400 Subject: [PATCH 1/2] fix(torii-grpc): subscribe indexer --- crates/torii/grpc/src/server/subscriptions/indexer.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/torii/grpc/src/server/subscriptions/indexer.rs b/crates/torii/grpc/src/server/subscriptions/indexer.rs index 9c4281afe0..5c4fccf9f6 100644 --- a/crates/torii/grpc/src/server/subscriptions/indexer.rs +++ b/crates/torii/grpc/src/server/subscriptions/indexer.rs @@ -47,7 +47,7 @@ impl IndexerManager { let (sender, receiver) = channel(1); let mut statement = - "SELECT head, tps, last_block_timestamp, contract_address FROM contracts".to_string(); + "SELECT * FROM contracts".to_string(); let contracts: Vec = if contract_address != Felt::ZERO { statement += " WHERE id = ?"; From 0df6efc13bcda3211a30c2c578882c8b86b8dc79 Mon Sep 17 00:00:00 2001 From: Nasr Date: Tue, 22 Oct 2024 12:50:47 -0400 Subject: [PATCH 2/2] fmt --- crates/torii/grpc/src/server/subscriptions/indexer.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/crates/torii/grpc/src/server/subscriptions/indexer.rs b/crates/torii/grpc/src/server/subscriptions/indexer.rs index 5c4fccf9f6..11271ce970 100644 --- a/crates/torii/grpc/src/server/subscriptions/indexer.rs +++ b/crates/torii/grpc/src/server/subscriptions/indexer.rs @@ -46,8 +46,7 @@ impl IndexerManager { let id = rand::thread_rng().gen::(); let (sender, receiver) = channel(1); - let mut statement = - "SELECT * FROM contracts".to_string(); + let mut statement = "SELECT * FROM contracts".to_string(); let contracts: Vec = if contract_address != Felt::ZERO { statement += " WHERE id = ?";