Don't require wallet to be unlocked when redeeming/refunding P2SH, since the private key is being passed into the request.

This commit is contained in:
CalDescent
2022-05-27 10:40:25 +02:00
parent 0dd7bdcace
commit b57610445f

View File

@@ -1748,11 +1748,6 @@ impl LightClient {
}
pub fn do_redeem_p2sh(&self, from: &str, addrs: Vec<(&str, u64, Option<String>)>, fee: &u64, script: &[u8], txid: &[u8], lock_time: u32, secret: &[u8], privkey: &[u8]) -> Result<String, String> {
if !self.wallet.read().unwrap().is_unlocked_for_spending() {
error!("Wallet is locked");
return Err("Wallet is locked".to_string());
}
info!("Creating transaction to redeem funds from P2SH");
let result = {