Skip to content

Commit

Permalink
chore: require query_auth
Browse files Browse the repository at this point in the history
  • Loading branch information
Theodus committed Jul 18, 2024
1 parent 945d63f commit 313ea4e
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
3 changes: 1 addition & 2 deletions src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@ pub struct Config {
pub kafka: Kafka,
#[serde_as(as = "DisplayFromStr")]
pub network_subgraph: Url,
#[serde(default)]
pub query_auth: Option<String>,
pub query_auth: Hidden<String>,
#[serde_as(as = "DisplayFromStr")]
pub rpc_url: Hidden<Url>,
pub secret_key: Hidden<B256>,
Expand Down
8 changes: 4 additions & 4 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,10 @@ async fn main() -> anyhow::Result<()> {
.build()?;
let mut network_subgraph =
SubgraphClient::builder(http_client.clone(), config.network_subgraph)
.with_auth_token(config.query_auth.clone())
.with_auth_token(Some(config.query_auth.clone()))
.build();
let mut escrow_subgraph = SubgraphClient::builder(http_client.clone(), config.escrow_subgraph)
.with_auth_token(config.query_auth)
.with_auth_token(Some(config.query_auth.clone()))
.build();

let authorized_signers = authorized_signers(&mut escrow_subgraph, &sender_address)
Expand Down Expand Up @@ -275,7 +275,7 @@ async fn active_indexers(
id: Address,
}
Ok(network_subgraph
.paginated_query::<Indexer>(query, 200)
.paginated_query::<Indexer>(query, 500)
.await
.map_err(|err| anyhow!(err))?
.into_iter()
Expand Down Expand Up @@ -319,7 +319,7 @@ async fn escrow_accounts(
id: Address,
}
let response = escrow_subgraph
.paginated_query::<EscrowAccount>(query, 200)
.paginated_query::<EscrowAccount>(query, 500)
.await;
match response {
Ok(accounts) => Ok(accounts
Expand Down
2 changes: 1 addition & 1 deletion src/receipts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ pub async fn track_receipts(
let mut client_config = rdkafka::ClientConfig::new();
client_config.extend(config.config.clone().into_iter());
let defaults = [
("group.id", "gw-escrow-manager"),
("group.id", "tap-escrow-manager"),
("enable.auto.commit", "true"),
("auto.offset.reset", "earliest"),
];
Expand Down

0 comments on commit 313ea4e

Please sign in to comment.