Skip to content

Commit

Permalink
fix: use accountMap
Browse files Browse the repository at this point in the history
  • Loading branch information
ZhengYuTay committed Jul 29, 2024
1 parent 6e9b7ef commit f96afdd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions jup_interface/src/pool_sol/deposit_sol.rs
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
use anyhow::{anyhow, Result};
use jupiter_amm_interface::{
Amm, AmmContext, KeyedAccount, Quote, QuoteParams, Swap, SwapAndAccountMetas, SwapParams,
AccountMap, Amm, AmmContext, KeyedAccount, Quote, QuoteParams, Swap, SwapAndAccountMetas,
SwapParams,
};
use solana_sdk::{account::Account, instruction::AccountMeta, pubkey::Pubkey, system_program};
use solana_sdk::{instruction::AccountMeta, pubkey::Pubkey, system_program};
use spl_token::native_mint;
use stakedex_interface::{StakeWrappedSolKeys, STAKE_WRAPPED_SOL_IX_ACCOUNTS_LEN};
use stakedex_sdk_common::{
find_deposit_stake_amm_key, find_fee_token_acc, stakedex_program, wsol_bridge_in, DepositSol,
InitFromKeyedAccount, TEMPORARY_JUP_AMM_LABEL,
};
use std::collections::HashMap;

use crate::jupiter_stakedex_interface::STAKEDEX_ACCOUNT_META;

Expand Down Expand Up @@ -43,7 +43,7 @@ where
self.0.get_accounts_to_update()
}

fn update(&mut self, accounts_map: &HashMap<Pubkey, Account>) -> Result<()> {
fn update(&mut self, accounts_map: &AccountMap) -> Result<()> {
self.0.update(accounts_map)
}

Expand Down
2 changes: 1 addition & 1 deletion stakedex_sdk/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ impl Stakedex {
})
}

pub fn update(&mut self, account_map: &HashMap<Pubkey, Account>) -> Vec<anyhow::Error> {
pub fn update(&mut self, account_map: &AccountMap) -> Vec<anyhow::Error> {
// unstake.it special-case: required reinitialization to save sol_reserves_lamports correctly
let maybe_unstake_it_init_err = match init_from_keyed_account_no_params(
account_map,
Expand Down

0 comments on commit f96afdd

Please sign in to comment.