diff --git a/tauri-app/src-tauri/src/commands/order.rs b/tauri-app/src-tauri/src/commands/order.rs index 679a735a3..8e5c60c35 100644 --- a/tauri-app/src-tauri/src/commands/order.rs +++ b/tauri-app/src-tauri/src/commands/order.rs @@ -5,7 +5,7 @@ use rain_orderbook_app_settings::{deployment::Deployment, scenario::Scenario}; use rain_orderbook_common::{ add_order::AddOrderArgs, csv::TryIntoCsv, dotrain_order::DotrainOrder, remove_order::RemoveOrderArgs, subgraph::SubgraphArgs, transaction::TransactionArgs, - types::FlattenError, types::OrderDetailExtended, types::OrderFlattened, + types::FlattenError, types::OrderFlattened, }; use std::fs; use std::path::PathBuf; @@ -31,21 +31,6 @@ pub async fn orders_list_write_csv( Ok(()) } -#[tauri::command] -pub async fn order_detail( - id: String, - subgraph_args: SubgraphArgs, -) -> CommandResult { - let order = subgraph_args - .to_subgraph_client() - .await? - .order_detail(id.into()) - .await?; - let order_extended: OrderDetailExtended = order.try_into()?; - - Ok(order_extended) -} - #[tauri::command] pub async fn order_add( app_handle: AppHandle, diff --git a/tauri-app/src-tauri/src/commands/order_take.rs b/tauri-app/src-tauri/src/commands/order_take.rs index c929e8696..05ab62718 100644 --- a/tauri-app/src-tauri/src/commands/order_take.rs +++ b/tauri-app/src-tauri/src/commands/order_take.rs @@ -2,33 +2,9 @@ use crate::error::CommandResult; use rain_orderbook_common::{ csv::TryIntoCsv, subgraph::SubgraphArgs, types::FlattenError, types::OrderTakeFlattened, }; - -use rain_orderbook_subgraph_client::performance::vol::VaultVolume; -use rain_orderbook_subgraph_client::{types::common::*, PaginationArgs}; use std::fs; use std::path::PathBuf; -#[tauri::command] -pub async fn order_trades_list( - order_id: String, - subgraph_args: SubgraphArgs, - pagination_args: PaginationArgs, - start_timestamp: Option, - end_timestamp: Option, -) -> CommandResult> { - let order_takes = subgraph_args - .to_subgraph_client() - .await? - .order_trades_list( - order_id.clone().into(), - pagination_args, - start_timestamp, - end_timestamp, - ) - .await?; - Ok(order_takes) -} - #[tauri::command] pub async fn order_trades_list_write_csv( path: PathBuf, @@ -51,32 +27,3 @@ pub async fn order_trades_list_write_csv( Ok(()) } - -#[tauri::command] -pub async fn order_vaults_volume( - order_id: String, - subgraph_args: SubgraphArgs, - start_timestamp: Option, - end_timestamp: Option, -) -> CommandResult> { - Ok(subgraph_args - .to_subgraph_client() - .await? - .order_vaults_volume(order_id.clone().into(), start_timestamp, end_timestamp) - .await?) -} - -#[tauri::command] -pub async fn order_trades_count( - order_id: String, - subgraph_args: SubgraphArgs, - start_timestamp: Option, - end_timestamp: Option, -) -> CommandResult { - Ok(subgraph_args - .to_subgraph_client() - .await? - .order_trades_list_all(order_id.clone().into(), start_timestamp, end_timestamp) - .await? - .len()) -} diff --git a/tauri-app/src-tauri/src/main.rs b/tauri-app/src-tauri/src/main.rs index 77af0bbcd..8eb9341df 100644 --- a/tauri-app/src-tauri/src/main.rs +++ b/tauri-app/src-tauri/src/main.rs @@ -14,14 +14,11 @@ use commands::config::{convert_configstring_to_config, merge_configstrings, pars use commands::dotrain::parse_dotrain; use commands::dotrain_add_order_lsp::{call_lsp_completion, call_lsp_hover, call_lsp_problems}; use commands::order::{ - compose_from_scenario, order_add, order_add_calldata, order_detail, order_remove, - order_remove_calldata, orders_list_write_csv, validate_raindex_version, + compose_from_scenario, order_add, order_add_calldata, order_remove, order_remove_calldata, + orders_list_write_csv, validate_raindex_version, }; use commands::order_quote::{batch_order_quotes, debug_order_quote}; -use commands::order_take::{ - order_trades_count, order_trades_list, order_trades_list_write_csv, - order_vaults_volume, -}; +use commands::order_take::order_trades_list_write_csv; use commands::trade_debug::debug_trade; use commands::vault::{ vault_balance_changes_list, vault_balance_changes_list_write_csv, vault_deposit, @@ -53,10 +50,8 @@ fn run_tauri_app() { vault_deposit, vault_withdraw, orders_list_write_csv, - order_detail, order_add, order_remove, - order_trades_list, order_trades_list_write_csv, get_address_from_ledger, get_chainid, @@ -80,9 +75,7 @@ fn run_tauri_app() { debug_order_quote, debug_trade, get_app_commit_sha, - validate_raindex_version, - order_vaults_volume, - order_trades_count, + validate_raindex_version ]) .run(tauri::generate_context!()) .expect("error while running tauri application");