Skip to content

Commit

Permalink
view: populate asset ids from dutch auction schedule / withdraw
Browse files Browse the repository at this point in the history
  • Loading branch information
cronokirby authored and conorsch committed Aug 15, 2024
1 parent 83dc0e4 commit 93218d3
Showing 1 changed file with 19 additions and 3 deletions.
22 changes: 19 additions & 3 deletions crates/view/src/service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ use async_stream::try_stream;
use camino::Utf8Path;
use decaf377::Fq;
use futures::stream::{self, StreamExt, TryStreamExt};
use penumbra_auction::auction::dutch::actions::view::ActionDutchAuctionWithdrawView;
use penumbra_auction::auction::dutch::actions::view::{
ActionDutchAuctionScheduleView, ActionDutchAuctionWithdrawView,
};
use rand::Rng;
use rand_core::OsRng;
use tap::{Tap, TapFallible};
Expand Down Expand Up @@ -996,8 +998,22 @@ impl ViewService for ViewServer {
}
ActionView::ActionDutchAuctionWithdraw(ActionDutchAuctionWithdrawView {
action: _,
reserves: _,
}) => { /* no-op for now - i'm not totally sure we have all the necessary data to attribute specific note openings to this view */
reserves,
}) => {
// previous comment: /* no-op for now - i'm not totally sure we have all the necessary data to attribute specific note openings to this view */
// to this cronokirby replied: well, we can however at least fill in some asset ids!
for value in reserves {
asset_ids.insert(value.asset_id());
}
}
// We can populate asset ids for the assets involved in the auction
ActionView::ActionDutchAuctionSchedule(ActionDutchAuctionScheduleView {
action,
..
}) => {
let description = &action.description;
asset_ids.insert(description.input.asset_id);
asset_ids.insert(description.output_id);
}
_ => {}
}
Expand Down

0 comments on commit 93218d3

Please sign in to comment.