From 6eb2cfa45d42ea5f96898d71c9743eb883038fcb Mon Sep 17 00:00:00 2001 From: "S. Santos" Date: Tue, 21 May 2024 16:19:58 -0300 Subject: [PATCH] Allow coin to be withdrawn if in IN_TRANSFER status --- clients/rust/src/withdraw.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/clients/rust/src/withdraw.rs b/clients/rust/src/withdraw.rs index 13065ece..7adb94a4 100644 --- a/clients/rust/src/withdraw.rs +++ b/clients/rust/src/withdraw.rs @@ -41,8 +41,8 @@ pub async fn execute(client_config: &ClientConfig, wallet_name: &str, statechain return Err(anyhow::anyhow!("coin.amount is None")); } - if coin.status != CoinStatus::CONFIRMED { - return Err(anyhow::anyhow!("Coin status must be CONFIRMED to withdraw it. The current status is {}", coin.status)); + if coin.status != CoinStatus::CONFIRMED && coin.status != CoinStatus::IN_TRANSFER { + return Err(anyhow::anyhow!("Coin status must be CONFIRMED or IN_TRANSFER to transfer it. The current status is {}", coin.status)); } let signed_tx = new_transaction(client_config, coin, &to_address, qt_backup_tx, true, None, &wallet.network, fee_rate).await?;