Preview market sweeps and execute protected share sales
This commit is contained in:
@@ -141,6 +141,7 @@ impl Listing {
|
||||
#[derive(Deserialize)]
|
||||
#[serde(tag = "op", rename_all = "snake_case", deny_unknown_fields)]
|
||||
pub(crate) enum Query {
|
||||
Estimate(crate::estimate::Request),
|
||||
Resolution {
|
||||
market: String,
|
||||
},
|
||||
@@ -172,8 +173,9 @@ pub(crate) enum Query {
|
||||
},
|
||||
}
|
||||
impl Query {
|
||||
pub fn read(self, db: &Connection) -> Result<Value> {
|
||||
pub fn read(self, db: &Transaction, books: &mut crate::resident::Books) -> Result<Value> {
|
||||
match self {
|
||||
Self::Estimate(request) => request.read(db, books),
|
||||
Self::Resolution { market } => crate::resolution::read(db, &market),
|
||||
Self::Assets { market } => assets::market_assets(db, &market),
|
||||
Self::Positions(filter) => filter.read(db),
|
||||
|
||||
Reference in New Issue
Block a user