From 475f93bde29ab3d4029136dcd99128366f980692 Mon Sep 17 00:00:00 2001 From: 0xFable <0xfable@protonmail.com> Date: Thu, 2 May 2024 13:22:35 +0100 Subject: [PATCH] fix: Update test to remove one of the fees --- .../liquidity_hub/bonding-manager/src/tests/rewards.rs | 6 +++--- contracts/liquidity_hub/bonding-manager/src/tests/robot.rs | 1 + contracts/liquidity_hub/pool-manager/src/swap/commands.rs | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/contracts/liquidity_hub/bonding-manager/src/tests/rewards.rs b/contracts/liquidity_hub/bonding-manager/src/tests/rewards.rs index ecb5827e..a5c3768d 100644 --- a/contracts/liquidity_hub/bonding-manager/src/tests/rewards.rs +++ b/contracts/liquidity_hub/bonding-manager/src/tests/rewards.rs @@ -115,7 +115,7 @@ fn test_fill_rewards_from_pool_manager() { |res| { // 1_000u128 - 9u128 swap_fee - 9u128 protocol_fee where protocol_fee and swap_fee are 1% of the swap amount // + 1_000u128 uwhale pool creation fee - assert_eq!(res, Uint128::from(1018u128)); + assert_eq!(res, Uint128::from(1009u128)); }, ); @@ -136,7 +136,7 @@ fn test_fill_rewards_from_pool_manager() { "uwhale".to_string(), robot.bonding_manager_addr.clone(), |res| { - assert_eq!(res, Uint128::from(2018u128)); + assert_eq!(res, Uint128::from(2009u128)); }, ); @@ -157,7 +157,7 @@ fn test_fill_rewards_from_pool_manager() { "uwhale".to_string(), robot.bonding_manager_addr.clone(), |res| { - assert_eq!(res, Uint128::from(3018u128)); + assert_eq!(res, Uint128::from(3009u128)); }, ); diff --git a/contracts/liquidity_hub/bonding-manager/src/tests/robot.rs b/contracts/liquidity_hub/bonding-manager/src/tests/robot.rs index 94ce1cc8..eedf0a0e 100644 --- a/contracts/liquidity_hub/bonding-manager/src/tests/robot.rs +++ b/contracts/liquidity_hub/bonding-manager/src/tests/robot.rs @@ -615,6 +615,7 @@ impl TestingRobot { receiver: None, lock_position_identifier: None, unlocking_duration: None, + max_spread: None, }; result( diff --git a/contracts/liquidity_hub/pool-manager/src/swap/commands.rs b/contracts/liquidity_hub/pool-manager/src/swap/commands.rs index 8d22f796..a4dc082b 100644 --- a/contracts/liquidity_hub/pool-manager/src/swap/commands.rs +++ b/contracts/liquidity_hub/pool-manager/src/swap/commands.rs @@ -41,7 +41,7 @@ pub fn swap( // verify that the assets sent match the ones from the pool let pair = get_pair_by_identifier(&deps.as_ref(), &pair_identifier)?; ensure!( - vec![ask_asset_denom, offer_asset.denom.clone()] + [ask_asset_denom, offer_asset.denom.clone()] .iter() .all(|asset| pair .assets