Skip to content

Commit

Permalink
[Blend Strategy] hot fix
Browse files Browse the repository at this point in the history
  • Loading branch information
joaquinsoza committed Dec 11, 2024
1 parent f18e14a commit b441b7e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion apps/contracts/strategies/blend/src/reserves.rs
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ pub fn withdraw(
reserves.total_b_tokens -= b_tokens_amount;

if share_amount > vault_shares {
panic_with_error!(e, StrategyError::InvalidArgument);
panic_with_error!(e, StrategyError::InsufficientBalance);
}

vault_shares -= share_amount;
Expand Down
2 changes: 1 addition & 1 deletion apps/contracts/strategies/blend/src/test/blend/success.rs
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ fn success() {

// -> verify over withdraw fails
let result = strategy_client.try_withdraw(&(withdraw_amount + 100_000_000_0000000), &user_3);
assert_eq!(result, Err(Ok(StrategyError::InvalidArgument))); // TODO: Check which is the one failing
assert_eq!(result, Err(Ok(StrategyError::InsufficientBalance)));

strategy_client.withdraw(&withdraw_amount, &user_2);
// -> verify withdraw auth
Expand Down

0 comments on commit b441b7e

Please sign in to comment.