Skip to content

Commit

Permalink
up
Browse files Browse the repository at this point in the history
  • Loading branch information
crypto-vincent committed Jan 6, 2024
1 parent 59cb6d5 commit d4aebfb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ pub(crate) fn handler(
total_shares_supply,
total_shares_value,
)?;
checked_sub(owned_shares_value, redeemable_amount_under_management)?
owned_shares_value.saturating_sub(redeemable_amount_under_management)
};

let overflow_value = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -269,10 +269,8 @@ pub(crate) fn handler(
.redeemable_amount_under_management,
)?;

let profits_collateral_amount = checked_sub(
owned_shares_value_before,
redeemable_amount_under_management,
)?;
let profits_collateral_amount =
owned_shares_value_before.saturating_sub(redeemable_amount_under_management);
msg!(
"[rebalance_redeem_withdraw_request_from_credix_lp_depository:profits_collateral_amount:{}]",
profits_collateral_amount
Expand Down

0 comments on commit d4aebfb

Please sign in to comment.