mirror of
https://github.com/comit-network/xmr-btc-swap.git
synced 2025-04-20 07:56:05 -04:00
fix: dprint
This commit is contained in:
parent
9ede610958
commit
799fdfc363
@ -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,
|
||||
|
@ -140,11 +140,17 @@ pub fn register_modules(context: Arc<Context>) -> Result<RpcModule<Arc<Context>>
|
||||
.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()?;
|
||||
|
Loading…
x
Reference in New Issue
Block a user