Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

view: populate asset ids from dutch auction schedule / withdraw #4816

Merged
merged 1 commit into from
Aug 15, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading