Skip to content

Commit f0fd404

Browse files
authored
fix: ignore product without price on polling (#133)
1 parent e4683c7 commit f0fd404

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/agent/state/oracle.rs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -521,7 +521,13 @@ async fn fetch_batch_of_product_and_price_accounts(
521521
// the product entries
522522
let mut todo = product_entries
523523
.values()
524-
.map(|p| p.account_data.px_acc)
524+
.filter_map(|p| {
525+
if p.account_data.px_acc != Pubkey::default() {
526+
Some(p.account_data.px_acc)
527+
} else {
528+
None
529+
}
530+
})
525531
.collect::<Vec<_>>();
526532

527533
while !todo.is_empty() {

0 commit comments

Comments
 (0)