Rename Method::RawHistory to Method::GetRawStates

This commit is contained in:
binarybaron 2023-08-28 00:50:41 +02:00 committed by binarybaron
parent 6f66e9cba5
commit c8343edf04
2 changed files with 15 additions and 15 deletions

View file

@ -37,27 +37,27 @@ pub enum Method {
monero_receive_address: monero::Address, monero_receive_address: monero::Address,
swap_id: Uuid, swap_id: Uuid,
}, },
History,
RawHistory,
Config,
WithdrawBtc {
amount: Option<Amount>,
address: bitcoin::Address,
},
Balance,
Resume { Resume {
swap_id: Uuid, swap_id: Uuid,
}, },
CancelAndRefund { CancelAndRefund {
swap_id: Uuid, swap_id: Uuid,
}, },
MoneroRecovery {
swap_id: Uuid,
},
History,
Config,
WithdrawBtc {
amount: Option<Amount>,
address: bitcoin::Address,
},
Balance,
ListSellers { ListSellers {
rendezvous_point: Multiaddr, rendezvous_point: Multiaddr,
}, },
ExportBitcoinWallet, ExportBitcoinWallet,
MoneroRecovery { SuspendCurrentSwap,
swap_id: Uuid,
},
StartDaemon { StartDaemon {
server_address: Option<SocketAddr>, server_address: Option<SocketAddr>,
}, },
@ -65,7 +65,7 @@ pub enum Method {
GetSwapInfo { GetSwapInfo {
swap_id: Uuid, swap_id: Uuid,
}, },
SuspendCurrentSwap, GetRawStates,
} }
impl Method { impl Method {
@ -124,7 +124,7 @@ impl Method {
log_reference_id = field::Empty log_reference_id = field::Empty
) )
} }
Method::RawHistory => debug_span!( Method::GetRawStates => debug_span!(
"method", "method",
name = "RawHistory", name = "RawHistory",
log_reference_id = field::Empty log_reference_id = field::Empty
@ -528,7 +528,7 @@ impl Request {
Ok(json!({ "swaps": vec })) Ok(json!({ "swaps": vec }))
} }
Method::RawHistory => { Method::GetRawStates => {
let raw_history = context.db.raw_all().await?; let raw_history = context.db.raw_all().await?;
Ok(json!({ "raw_history": raw_history })) Ok(json!({ "raw_history": raw_history }))

View file

@ -52,7 +52,7 @@ pub fn register_modules(context: Arc<Context>) -> RpcModule<Arc<Context>> {
module module
.register_async_method("get_raw_history", |params, context| async move { .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(); .unwrap();