236: Some wallet cleanup + watch for deposit r=thomaseizinger a=thomaseizinger



Co-authored-by: Thomas Eizinger <thomas@eizinger.io>
This commit is contained in:
bors[bot] 2021-02-28 23:26:31 +00:00 committed by GitHub
commit 9a32f7d405
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
15 changed files with 109 additions and 117 deletions

View file

@ -1,5 +1,3 @@
use crate::bitcoin;
use anyhow::Result;
use libp2p::{core::Multiaddr, PeerId};
use std::path::PathBuf;
use uuid::Uuid;
@ -32,9 +30,6 @@ pub enum Command {
default_value = DEFAULT_ALICE_MULTIADDR
)]
alice_addr: Multiaddr,
#[structopt(long = "send-btc", help = "Bitcoin amount as floating point nr without denomination (e.g. 1.25)", parse(try_from_str = parse_btc))]
send_bitcoin: bitcoin::Amount,
},
History,
Resume(Resume),
@ -102,8 +97,3 @@ pub enum Refund {
force: bool,
},
}
fn parse_btc(str: &str) -> Result<bitcoin::Amount> {
let amount = bitcoin::Amount::from_str_in(str, ::bitcoin::Denomination::Bitcoin)?;
Ok(amount)
}