Skip to content

Commit

Permalink
add missing changes
Browse files Browse the repository at this point in the history
  • Loading branch information
vito-kovalione committed Dec 18, 2024
1 parent 95fc24e commit 814857e
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions programs/tokenized_vault/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,7 @@ pub mod tokenized_vault {
max_loss: u64,
remaining_accounts_map: AccountsMap
) -> Result<()> {
let shares = ctx.accounts.vault.load()?.convert_to_shares(amount);
handle_withdraw(ctx, amount, shares, max_loss, remaining_accounts_map)
handle_withdraw(ctx, amount, max_loss, remaining_accounts_map)
}

pub fn redeem<'info>(
Expand All @@ -52,8 +51,7 @@ pub mod tokenized_vault {
max_loss: u64,
remaining_accounts_map: AccountsMap
) -> Result<()> {
let amount = ctx.accounts.vault.load()?.convert_to_underlying(shares);
handle_withdraw(ctx, amount, shares, max_loss, remaining_accounts_map)
handle_redeem(ctx, shares, max_loss, remaining_accounts_map)
}

pub fn add_strategy(ctx: Context<AddStrategy>, max_debt: u64) -> Result<()> {
Expand Down

0 comments on commit 814857e

Please sign in to comment.