From c8343edf04db7aa8838b5c9d1d185be6298b34f2 Mon Sep 17 00:00:00 2001 From: binarybaron <86064887+binarybaron@users.noreply.github.com> Date: Mon, 28 Aug 2023 00:50:41 +0200 Subject: [PATCH] Rename `Method::RawHistory` to `Method::GetRawStates` --- swap/src/api/request.rs | 28 ++++++++++++++-------------- swap/src/rpc/methods.rs | 2 +- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/swap/src/api/request.rs b/swap/src/api/request.rs index c0e87474..1f0e229f 100644 --- a/swap/src/api/request.rs +++ b/swap/src/api/request.rs @@ -37,27 +37,27 @@ pub enum Method { monero_receive_address: monero::Address, swap_id: Uuid, }, - History, - RawHistory, - Config, - WithdrawBtc { - amount: Option, - address: bitcoin::Address, - }, - Balance, Resume { swap_id: Uuid, }, CancelAndRefund { swap_id: Uuid, }, + MoneroRecovery { + swap_id: Uuid, + }, + History, + Config, + WithdrawBtc { + amount: Option, + address: bitcoin::Address, + }, + Balance, ListSellers { rendezvous_point: Multiaddr, }, ExportBitcoinWallet, - MoneroRecovery { - swap_id: Uuid, - }, + SuspendCurrentSwap, StartDaemon { server_address: Option, }, @@ -65,7 +65,7 @@ pub enum Method { GetSwapInfo { swap_id: Uuid, }, - SuspendCurrentSwap, + GetRawStates, } impl Method { @@ -124,7 +124,7 @@ impl Method { log_reference_id = field::Empty ) } - Method::RawHistory => debug_span!( + Method::GetRawStates => debug_span!( "method", name = "RawHistory", log_reference_id = field::Empty @@ -528,7 +528,7 @@ impl Request { Ok(json!({ "swaps": vec })) } - Method::RawHistory => { + Method::GetRawStates => { let raw_history = context.db.raw_all().await?; Ok(json!({ "raw_history": raw_history })) diff --git a/swap/src/rpc/methods.rs b/swap/src/rpc/methods.rs index 7f51ac6e..b7dc39cc 100644 --- a/swap/src/rpc/methods.rs +++ b/swap/src/rpc/methods.rs @@ -52,7 +52,7 @@ pub fn register_modules(context: Arc) -> RpcModule> { module .register_async_method("get_raw_history", |params, context| async move { - execute_request(params, Method::RawHistory, &context).await + execute_request(params, Method::GetRawStates, &context).await }) .unwrap();