}
fn send_to_address(
&self,
address: Address<NetworkUnchecked>,
amount: f64,
comment: Option<String>,
comment_to: Option<String>,
subtract_fee: Option<bool>,
replaceable: Option<bool>,
confirmation_target: Option<u32>,
estimate_mode: Option<EstimateMode>,
avoid_reuse: Option<bool>,
fee_rate: Option<f64>,
verbose: Option<bool>,
) -> Result<Txid, jsonrpc_core::Error> {
assert_eq!(comment, None);
assert_eq!(comment_to, None);
assert_eq!(subtract_fee, None);
assert_eq!(replaceable, None);
assert_eq!(confirmation_target, None);
assert_eq!(estimate_mode, None);
assert_eq!(avoid_reuse, None);
assert_eq!(verbose, None);
let mut state = self.state.lock().unwrap();
let locked = state.locked.iter().cloned().collect::<Vec<OutPoint>>();
let value = Amount::from_btc(amount).expect("error converting amount to sat");
let (outpoint, utxo_amount) = match state
.utxos
.iter()
.find(|(outpoint, amount)| *amount >= &value && !locked.contains(outpoint))