mirror of
https://github.com/comit-network/xmr-btc-swap.git
synced 2025-12-01 04:56:41 -05:00
dprint fmt
This commit is contained in:
parent
13945cbd8f
commit
7193866c30
5 changed files with 110 additions and 59 deletions
|
|
@ -13,21 +13,25 @@ use uuid::Uuid;
|
|||
|
||||
pub fn register_modules(context: Arc<Context>) -> RpcModule<Arc<Context>> {
|
||||
let mut module = RpcModule::new(context);
|
||||
|
||||
module
|
||||
.register_async_method("get_bitcoin_balance", |_, context| async move {
|
||||
get_bitcoin_balance(&context).await
|
||||
})
|
||||
.expect("Could not register RPC method get_bitcoin_balance");
|
||||
|
||||
module
|
||||
.register_async_method("get_history", |_, context| async move {
|
||||
get_history(&context).await
|
||||
})
|
||||
.expect("Could not register RPC method get_history");
|
||||
|
||||
module
|
||||
.register_async_method("get_raw_history", |_, context| async move {
|
||||
get_raw_history(&context).await
|
||||
})
|
||||
.expect("Could not register RPC method get_history");
|
||||
|
||||
module
|
||||
.register_async_method("get_seller", |params, context| async move {
|
||||
let params: HashMap<String, Uuid> = params.parse()?;
|
||||
|
|
@ -39,6 +43,7 @@ pub fn register_modules(context: Arc<Context>) -> RpcModule<Arc<Context>> {
|
|||
get_seller(*swap_id, &context).await
|
||||
})
|
||||
.expect("Could not register RPC method get_seller");
|
||||
|
||||
module
|
||||
.register_async_method("get_swap_start_date", |params, context| async move {
|
||||
let params: HashMap<String, Uuid> = params.parse()?;
|
||||
|
|
@ -50,6 +55,7 @@ pub fn register_modules(context: Arc<Context>) -> RpcModule<Arc<Context>> {
|
|||
get_swap_start_date(*swap_id, &context).await
|
||||
})
|
||||
.expect("Could not register RPC method get_swap_start_date");
|
||||
|
||||
module
|
||||
.register_async_method("resume_swap", |params, context| async move {
|
||||
let params: HashMap<String, Uuid> = params.parse()?;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue