Skip to content

Commit

Permalink
fix: Update test to remove one of the fees
Browse files Browse the repository at this point in the history
  • Loading branch information
0xFable committed May 2, 2024
1 parent 4423ed0 commit 475f93b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
6 changes: 3 additions & 3 deletions contracts/liquidity_hub/bonding-manager/src/tests/rewards.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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));
},
);

Expand All @@ -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));
},
);

Expand All @@ -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));
},
);

Expand Down
1 change: 1 addition & 0 deletions contracts/liquidity_hub/bonding-manager/src/tests/robot.rs
Original file line number Diff line number Diff line change
Expand Up @@ -615,6 +615,7 @@ impl TestingRobot {
receiver: None,
lock_position_identifier: None,
unlocking_duration: None,
max_spread: None,
};

result(
Expand Down
2 changes: 1 addition & 1 deletion contracts/liquidity_hub/pool-manager/src/swap/commands.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 475f93b

Please sign in to comment.