Default to buy xmr using default trait

This commit is contained in:
rishflab 2021-03-01 10:53:43 +11:00
parent d6d67f62f1
commit 9a82b572ec
2 changed files with 68 additions and 104 deletions

View file

@ -84,3 +84,16 @@ pub enum Command {
force: bool,
},
}
impl Default for Command {
fn default() -> Self {
Self::BuyXmr {
alice_peer_id: DEFAULT_ALICE_PEER_ID
.parse()
.expect("default alice peer id str is a valid Multiaddr>"),
alice_addr: DEFAULT_ALICE_MULTIADDR
.parse()
.expect("default alice multiaddr str is a valid PeerId"),
}
}
}