Skip to content

Commit a3cc07e

Browse files
authored
fix: check subgraph before closing allocations (#435)
1 parent 7116ca5 commit a3cc07e

File tree

4 files changed

+259
-12
lines changed

4 files changed

+259
-12
lines changed
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
query ClosedAllocations(
2+
$allocation_ids: [ID!]!,
3+
$block: Block_height,
4+
$first: Int!,
5+
$last: ID!,
6+
) {
7+
meta: _meta(block: $block) { block { number hash timestamp } }
8+
allocations(
9+
block: $block
10+
orderBy: id
11+
orderDirection: asc
12+
first: $first
13+
where: {
14+
and: [
15+
{ closedAt_not: null }
16+
{ id_gt: $last }
17+
{ id_in: $allocation_ids }
18+
]
19+
}
20+
) {
21+
id
22+
}
23+
}

tap-agent/src/agent.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,7 @@ pub async fn start_agent() -> (ActorRef<SenderAccountsManagerMessage>, JoinHandl
131131
indexer_allocations,
132132
escrow_accounts,
133133
escrow_subgraph,
134+
network_subgraph,
134135
sender_aggregator_endpoints: sender_aggregator_endpoints.clone(),
135136
prefix: None,
136137
};

0 commit comments

Comments
 (0)