From b57610445f101adea813075dabcc66391bd0e51d Mon Sep 17 00:00:00 2001 From: CalDescent <> Date: Fri, 27 May 2022 10:40:25 +0200 Subject: [PATCH] Don't require wallet to be unlocked when redeeming/refunding P2SH, since the private key is being passed into the request. --- lib/src/lightclient.rs | 5 ----- 1 file changed, 5 deletions(-) diff --git a/lib/src/lightclient.rs b/lib/src/lightclient.rs index 6782763..777e016 100644 --- a/lib/src/lightclient.rs +++ b/lib/src/lightclient.rs @@ -1748,11 +1748,6 @@ impl LightClient { } pub fn do_redeem_p2sh(&self, from: &str, addrs: Vec<(&str, u64, Option)>, fee: &u64, script: &[u8], txid: &[u8], lock_time: u32, secret: &[u8], privkey: &[u8]) -> Result { - 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 = {