Add command to generate bitcoin deposit address

This commit is contained in:
rishflab 2021-02-09 17:32:04 +11:00 committed by Daniel Karzel
parent 23cbee842f
commit 7e10c5e7c3
2 changed files with 16 additions and 0 deletions

View file

@ -52,6 +52,10 @@ pub enum Command {
Resume(Resume), Resume(Resume),
Cancel(Cancel), Cancel(Cancel),
Refund(Refund), Refund(Refund),
Deposit {
#[structopt(flatten)]
config: Config,
},
} }
#[derive(structopt::StructOpt, Debug)] #[derive(structopt::StructOpt, Debug)]

View file

@ -331,6 +331,18 @@ async fn main() -> Result<()> {
) )
.await??; .await??;
} }
Command::Deposit { config } => {
let (bitcoin_wallet, _) = init_wallets(
config.path,
bitcoin_network,
&wallet_data_dir,
monero_network,
seed,
)
.await?;
let address = bitcoin_wallet.new_address().await?;
info!("Deposit bitcoin here: {}", address);
}
}; };
Ok(()) Ok(())