Cancel command

This commit is contained in:
Daniel Karzel 2021-02-01 16:10:43 +11:00
parent ec661178f4
commit 0600a7048e
5 changed files with 308 additions and 236 deletions

View file

@ -50,6 +50,7 @@ pub enum Command {
},
History,
Resume(Resume),
Cancel(Cancel),
}
#[derive(structopt::StructOpt, Debug)]
@ -79,6 +80,24 @@ pub enum Resume {
},
}
#[derive(structopt::StructOpt, Debug)]
pub enum Cancel {
BuyXmr {
#[structopt(long = "swap-id")]
swap_id: Uuid,
// TODO: Remove Alice peer-id/address, it should be saved in the database when running swap
// and loaded from the database when running resume/cancel/refund
#[structopt(long = "counterpart-peer-id")]
alice_peer_id: PeerId,
#[structopt(long = "counterpart-addr")]
alice_addr: Multiaddr,
#[structopt(flatten)]
config: Config,
},
}
#[derive(structopt::StructOpt, Debug)]
pub struct Config {
#[structopt(