        &mut self.wallet_lib
    }

    fn reconnect(&mut self) {
        self.electrumx_client = ElectrumxClient::new("127.0.0.1:60401".to_string()).unwrap();
    }

    fn send_coins(&mut self, addr_str: String, amt: u64, lock_coins: bool, witness_only: bool, submit: bool) -> Result<(Transaction, LockId), Box<Error>> {
        let (tx, lock_id) = self.wallet_lib.send_coins(addr_str, amt, lock_coins, witness_only)?;
        if submit {
            self.publish_tx(&tx);
        }
        Ok((tx, lock_id))
    }
