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,
swap_id: Uuid,
},
History,
RawHistory,
Config,
WithdrawBtc {
amount: Option<Amount>,
address: bitcoin::Address,
},
Balance,
Resume {
swap_id: Uuid,
},
CancelAndRefund {
swap_id: Uuid,
},
MoneroRecovery {
swap_id: Uuid,
},
History,
Config,
WithdrawBtc {
amount: Option<Amount>,
address: bitcoin::Address,
},
Balance,
ListSellers {
rendezvous_point: Multiaddr,
},
ExportBitcoinWallet,
MoneroRecovery {
swap_id: Uuid,
},
SuspendCurrentSwap,
StartDaemon {
server_address: Option<SocketAddr>,
},
@ -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 }))

View file

@ -52,7 +52,7 @@ pub fn register_modules(context: Arc<Context>) -> RpcModule<Arc<Context>> {
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();