diff --git a/lib/core/src/recover/handlers/tests/handle_chain_receive_swap_tests.rs b/lib/core/src/recover/handlers/tests/handle_chain_receive_swap_tests.rs index eca0482..bfb3d10 100644 --- a/lib/core/src/recover/handlers/tests/handle_chain_receive_swap_tests.rs +++ b/lib/core/src/recover/handlers/tests/handle_chain_receive_swap_tests.rs @@ -124,7 +124,7 @@ mod test { recovered_data.derive_partial_state(Some(100000), None, false, true), Some(PaymentState::WaitingFeeAcceptance) ); - // Expired - should be Refundable + // Expired without balance - should be Pending assert_eq!( recovered_data.derive_partial_state(Some(100000), None, true, false), Some(PaymentState::Pending) diff --git a/lib/core/src/recover/handlers/tests/handle_receive_swap_tests_integration.rs b/lib/core/src/recover/handlers/tests/handle_receive_swap_tests_integration.rs index d60520c..1a18126 100644 --- a/lib/core/src/recover/handlers/tests/handle_receive_swap_tests_integration.rs +++ b/lib/core/src/recover/handlers/tests/handle_receive_swap_tests_integration.rs @@ -4,7 +4,7 @@ mod test { chain::liquid::MockLiquidChainService, model::{PaymentState, ReceiveSwap, SwapMetadata}, recover::{ - handlers::{tests::test::create_mock_wallet_tx, ReceiveSwapHandler}, + handlers::{tests::test::create_mock_lbtc_wallet_tx, ReceiveSwapHandler}, model::{HistoryTxId, RecoveryContext, TxMap}, }, swapper::MockSwapper, @@ -341,7 +341,7 @@ mod test { .insert(claim_script.clone(), script_history); // Create wallet tx - let wallet_tx = create_mock_wallet_tx(tx_id_hex, height, amount as i64); + let wallet_tx = create_mock_lbtc_wallet_tx(tx_id_hex, height, amount as i64); // Add to incoming tx map context @@ -408,7 +408,7 @@ mod test { .insert(mrh_script.clone(), script_history); // Create wallet tx - let wallet_tx = create_mock_wallet_tx(tx_id_hex, height, amount as i64); + let wallet_tx = create_mock_lbtc_wallet_tx(tx_id_hex, height, amount as i64); // Add to incoming tx map context diff --git a/lib/core/src/recover/handlers/tests/handle_send_swap_tests_integration.rs b/lib/core/src/recover/handlers/tests/handle_send_swap_tests_integration.rs index 594583a..e25b52d 100644 --- a/lib/core/src/recover/handlers/tests/handle_send_swap_tests_integration.rs +++ b/lib/core/src/recover/handlers/tests/handle_send_swap_tests_integration.rs @@ -2,7 +2,7 @@ mod test { use crate::chain::liquid::MockLiquidChainService; use crate::prelude::*; - use crate::recover::handlers::tests::test::create_mock_wallet_tx; + use crate::recover::handlers::tests::test::create_mock_lbtc_wallet_tx; use crate::recover::handlers::SendSwapHandler; use crate::recover::model::*; use crate::swapper::MockSwapper; @@ -360,7 +360,7 @@ mod test { .insert(script.clone(), script_history); // Create wallet tx - let wallet_tx = create_mock_wallet_tx(tx_id_hex, height, -100000); // Negative amount for outgoing + let wallet_tx = create_mock_lbtc_wallet_tx(tx_id_hex, height, -100000); // Negative amount for outgoing // Add to outgoing tx map context.tx_map.outgoing_tx_map.insert(tx_id, wallet_tx); @@ -425,7 +425,7 @@ mod test { .insert(script.clone(), script_history); // Create wallet tx - let wallet_tx = create_mock_wallet_tx(tx_id_hex, height, amount as i64); // Positive amount for incoming + let wallet_tx = create_mock_lbtc_wallet_tx(tx_id_hex, height, amount as i64); // Positive amount for incoming // Add to incoming tx map context diff --git a/lib/core/src/recover/handlers/tests/mod.rs b/lib/core/src/recover/handlers/tests/mod.rs index 8fee215..d3dd36a 100644 --- a/lib/core/src/recover/handlers/tests/mod.rs +++ b/lib/core/src/recover/handlers/tests/mod.rs @@ -48,28 +48,6 @@ mod test { } } - // Create a mock wallet transaction - pub(crate) fn create_mock_wallet_tx(tx_id_hex: &str, height: u32, amount: i64) -> WalletTx { - create_mock_lbtc_wallet_tx(tx_id_hex, height, amount) - // let tx_id = Txid::from_str(tx_id_hex).unwrap(); - - // // Create balance for the transaction - // let mut balance = BTreeMap::new(); - // balance.insert(AssetId::default(), amount as i64); - - // WalletTx { - // txid: tx_id, - // tx: create_empty_transaction(), - // height: Some(height), - // fee: 1000, - // timestamp: Some(1001), // Just after swap creation time - // balance, - // outputs: Vec::new(), - // inputs: Vec::new(), - // type_: "".to_string(), - // } - } - // Create a mock LBTC wallet transaction pub(crate) fn create_mock_lbtc_wallet_tx( tx_id_hex: &str,