From 799fdfc363ab7d4cf3b0aff0e4f58e80b9896b09 Mon Sep 17 00:00:00 2001 From: binarybaron Date: Wed, 24 Jul 2024 22:46:25 +0200 Subject: [PATCH] fix: dprint --- swap/src/cli/command.rs | 7 +++---- swap/src/rpc/methods.rs | 12 +++++++++--- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/swap/src/cli/command.rs b/swap/src/cli/command.rs index 36fe4c8a..4881d94e 100644 --- a/swap/src/cli/command.rs +++ b/swap/src/cli/command.rs @@ -81,12 +81,11 @@ where ) .await?; - let monero_receive_address = monero_address::validate_is_testnet(monero_receive_address, is_testnet)?; - let bitcoin_change_address = bitcoin_change_address.map(|address| { - bitcoin_address::validate_is_testnet(address, is_testnet) - }).transpose()?; + let bitcoin_change_address = bitcoin_change_address + .map(|address| bitcoin_address::validate_is_testnet(address, is_testnet)) + .transpose()?; let request = Request::new(Method::BuyXmr { seller, diff --git a/swap/src/rpc/methods.rs b/swap/src/rpc/methods.rs index 2627ae86..f804e085 100644 --- a/swap/src/rpc/methods.rs +++ b/swap/src/rpc/methods.rs @@ -140,11 +140,17 @@ pub fn register_modules(context: Arc) -> Result> .map(|addr_str| { bitcoin::Address::from_str(addr_str) .map_err(|err| { - jsonrpsee_core::Error::Custom(format!("Could not parse bitcoin address: {}", err)) + jsonrpsee_core::Error::Custom(format!( + "Could not parse bitcoin address: {}", + err + )) }) .and_then(|address| { - bitcoin_address::validate(address, context.config.env_config.bitcoin_network) - .map_err(|err| jsonrpsee_core::Error::Custom(err.to_string())) + bitcoin_address::validate( + address, + context.config.env_config.bitcoin_network, + ) + .map_err(|err| jsonrpsee_core::Error::Custom(err.to_string())) }) }) .transpose()?;