mirror of
https://github.com/comit-network/xmr-btc-swap.git
synced 2025-06-06 22:29:05 -04:00
Make struct-opt docs more consistent
- Remove dots from the of help messages - Unify wording
This commit is contained in:
parent
bbc3a49f41
commit
5c37fe6733
2 changed files with 15 additions and 14 deletions
|
@ -272,11 +272,11 @@ async fn main() -> Result<()> {
|
||||||
cli::refund(swap_id, Arc::new(bitcoin_wallet), db, force).await??;
|
cli::refund(swap_id, Arc::new(bitcoin_wallet), db, force).await??;
|
||||||
}
|
}
|
||||||
Command::ListSellers {
|
Command::ListSellers {
|
||||||
rendezvous_node_addr,
|
rendezvous_point,
|
||||||
namespace,
|
namespace,
|
||||||
tor_socks5_port,
|
tor_socks5_port,
|
||||||
} => {
|
} => {
|
||||||
let rendezvous_node_peer_id = rendezvous_node_addr
|
let rendezvous_node_peer_id = rendezvous_point
|
||||||
.extract_peer_id()
|
.extract_peer_id()
|
||||||
.context("Rendezvous node address must contain peer ID")?;
|
.context("Rendezvous node address must contain peer ID")?;
|
||||||
|
|
||||||
|
@ -287,7 +287,7 @@ async fn main() -> Result<()> {
|
||||||
|
|
||||||
let mut sellers = list_sellers(
|
let mut sellers = list_sellers(
|
||||||
rendezvous_node_peer_id,
|
rendezvous_node_peer_id,
|
||||||
rendezvous_node_addr,
|
rendezvous_point,
|
||||||
namespace,
|
namespace,
|
||||||
tor_socks5_port,
|
tor_socks5_port,
|
||||||
identity,
|
identity,
|
||||||
|
|
|
@ -188,7 +188,7 @@ where
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
RawCommand::ListSellers {
|
RawCommand::ListSellers {
|
||||||
rendezvous_node_addr,
|
rendezvous_point,
|
||||||
tor: Tor { tor_socks5_port },
|
tor: Tor { tor_socks5_port },
|
||||||
} => Arguments {
|
} => Arguments {
|
||||||
env_config: env_config_from(is_testnet),
|
env_config: env_config_from(is_testnet),
|
||||||
|
@ -196,7 +196,7 @@ where
|
||||||
json,
|
json,
|
||||||
data_dir: data::data_dir_from(data, is_testnet)?,
|
data_dir: data::data_dir_from(data, is_testnet)?,
|
||||||
cmd: Command::ListSellers {
|
cmd: Command::ListSellers {
|
||||||
rendezvous_node_addr,
|
rendezvous_point,
|
||||||
namespace: rendezvous_namespace_from(is_testnet),
|
namespace: rendezvous_namespace_from(is_testnet),
|
||||||
tor_socks5_port,
|
tor_socks5_port,
|
||||||
},
|
},
|
||||||
|
@ -238,7 +238,7 @@ pub enum Command {
|
||||||
bitcoin_target_block: usize,
|
bitcoin_target_block: usize,
|
||||||
},
|
},
|
||||||
ListSellers {
|
ListSellers {
|
||||||
rendezvous_node_addr: Multiaddr,
|
rendezvous_point: Multiaddr,
|
||||||
namespace: XmrBtcNamespace,
|
namespace: XmrBtcNamespace,
|
||||||
tor_socks5_port: u16,
|
tor_socks5_port: u16,
|
||||||
},
|
},
|
||||||
|
@ -261,13 +261,13 @@ struct RawArguments {
|
||||||
)]
|
)]
|
||||||
data: Option<PathBuf>,
|
data: Option<PathBuf>,
|
||||||
|
|
||||||
#[structopt(long, help = "Activate debug logging.")]
|
#[structopt(long, help = "Activate debug logging")]
|
||||||
debug: bool,
|
debug: bool,
|
||||||
|
|
||||||
#[structopt(
|
#[structopt(
|
||||||
short,
|
short,
|
||||||
long = "json",
|
long = "json",
|
||||||
help = "Changes the log messages to json vs plain-text. This can be helpful to simplify automated log analyses."
|
help = "Outputs all logs in JSON format instead of plain text"
|
||||||
)]
|
)]
|
||||||
json: bool,
|
json: bool,
|
||||||
|
|
||||||
|
@ -277,7 +277,7 @@ struct RawArguments {
|
||||||
|
|
||||||
#[derive(structopt::StructOpt, Debug)]
|
#[derive(structopt::StructOpt, Debug)]
|
||||||
enum RawCommand {
|
enum RawCommand {
|
||||||
/// Start a XMR for BTC swap
|
/// Start a BTC for XMR swap
|
||||||
BuyXmr {
|
BuyXmr {
|
||||||
#[structopt(flatten)]
|
#[structopt(flatten)]
|
||||||
seller: Seller,
|
seller: Seller,
|
||||||
|
@ -303,7 +303,7 @@ enum RawCommand {
|
||||||
#[structopt(flatten)]
|
#[structopt(flatten)]
|
||||||
tor: Tor,
|
tor: Tor,
|
||||||
},
|
},
|
||||||
/// Show a list of past ongoing and completed swaps
|
/// Show a list of past, ongoing and completed swaps
|
||||||
History,
|
History,
|
||||||
/// Resume a swap
|
/// Resume a swap
|
||||||
Resume {
|
Resume {
|
||||||
|
@ -330,7 +330,7 @@ enum RawCommand {
|
||||||
#[structopt(flatten)]
|
#[structopt(flatten)]
|
||||||
bitcoin: Bitcoin,
|
bitcoin: Bitcoin,
|
||||||
},
|
},
|
||||||
/// Try to cancel a swap and refund my BTC (expert users only)
|
/// Try to cancel a swap and refund the BTC (expert users only)
|
||||||
Refund {
|
Refund {
|
||||||
#[structopt(flatten)]
|
#[structopt(flatten)]
|
||||||
swap_id: SwapId,
|
swap_id: SwapId,
|
||||||
|
@ -341,13 +341,14 @@ enum RawCommand {
|
||||||
#[structopt(flatten)]
|
#[structopt(flatten)]
|
||||||
bitcoin: Bitcoin,
|
bitcoin: Bitcoin,
|
||||||
},
|
},
|
||||||
|
/// Discover and list sellers (i.e. ASB providers)
|
||||||
ListSellers {
|
ListSellers {
|
||||||
#[structopt(
|
#[structopt(
|
||||||
long,
|
long,
|
||||||
help = "The multiaddr (including peer-id) of a rendezvous node that sellers register with",
|
help = "Address of the rendezvous point you want to use to discover ASBs",
|
||||||
default_value = DEFAULT_RENDEZVOUS_ADDRESS
|
default_value = DEFAULT_RENDEZVOUS_ADDRESS
|
||||||
)]
|
)]
|
||||||
rendezvous_node_addr: Multiaddr,
|
rendezvous_point: Multiaddr,
|
||||||
|
|
||||||
#[structopt(flatten)]
|
#[structopt(flatten)]
|
||||||
tor: Tor,
|
tor: Tor,
|
||||||
|
@ -370,7 +371,7 @@ struct Bitcoin {
|
||||||
|
|
||||||
#[structopt(
|
#[structopt(
|
||||||
long = "bitcoin-target-block",
|
long = "bitcoin-target-block",
|
||||||
help = "Use for fee estimation, decides within how many blocks the Bitcoin transactions should be confirmed."
|
help = "Estimate Bitcoin fees such that transactions are confirmed within the specified number of blocks"
|
||||||
)]
|
)]
|
||||||
bitcoin_target_block: Option<usize>,
|
bitcoin_target_block: Option<usize>,
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue