mirror of
https://github.com/comit-network/xmr-btc-swap.git
synced 2025-08-06 05:24:42 -04:00
Add command to generate bitcoin deposit address
This commit is contained in:
parent
23cbee842f
commit
7e10c5e7c3
2 changed files with 16 additions and 0 deletions
|
@ -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)]
|
||||||
|
|
|
@ -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(())
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue