Skip to content

Commit

Permalink
clip
Browse files Browse the repository at this point in the history
  • Loading branch information
0xripleys committed Jul 5, 2024
1 parent be326fb commit a7ec4fa
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 10 deletions.
2 changes: 1 addition & 1 deletion token-lending/program/tests/helpers/mock_pyth.rs
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ impl Processor {
msg!("Mock Pyth: Set price");
let price_account_info = next_account_info(account_info_iter)?;
let data = &mut price_account_info.try_borrow_mut_data()?;
let mut price_account: &mut PriceAccount = load_mut(data).unwrap();
let price_account: &mut PriceAccount = load_mut(data).unwrap();

price_account.agg.price = price;
price_account.agg.conf = conf;
Expand Down
2 changes: 0 additions & 2 deletions token-lending/program/tests/helpers/mock_pyth_pull.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ use borsh::{BorshDeserialize, BorshSerialize};
use spl_token::solana_program::{account_info::next_account_info, program_error::ProgramError};
use thiserror::Error;

use super::{load_mut, QUOTE_CURRENCY};

#[derive(BorshSerialize, BorshDeserialize)]
pub enum MockPythPullInstruction {
/// Accounts:
Expand Down
2 changes: 1 addition & 1 deletion token-lending/program/tests/helpers/mock_switchboard.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ use solana_program::{
sysvar::Sysvar,
};
use std::cell::RefMut;
use switchboard_on_demand::OracleSubmission;

use switchboard_v2::{AggregatorAccountData, SwitchboardDecimal};

use borsh::{BorshDeserialize, BorshSerialize};
Expand Down
3 changes: 1 addition & 2 deletions token-lending/program/tests/helpers/mock_switchboard_pull.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,8 @@ use solana_program::{
pubkey::Pubkey,
sysvar::Sysvar,
};
use std::cell::RefMut;

use switchboard_on_demand::PullFeedAccountData;
use switchboard_v2::{AggregatorAccountData, SwitchboardDecimal};

use borsh::{BorshDeserialize, BorshSerialize};
use spl_token::solana_program::{account_info::next_account_info, program_error::ProgramError};
Expand Down
5 changes: 1 addition & 4 deletions token-lending/program/tests/helpers/solend_program_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1870,10 +1870,7 @@ pub async fn custom_scenario(
.or_insert(arg.liquidity_amount);
}

let mints_and_liquidity_amounts = mints_and_liquidity_amounts
.into_iter()
.map(|(mint, liquidity_amount)| (mint, liquidity_amount))
.collect::<Vec<_>>();
let mints_and_liquidity_amounts = mints_and_liquidity_amounts.into_iter().collect::<Vec<_>>();

let lending_market_owner =
User::new_with_balances(&mut test, &mints_and_liquidity_amounts).await;
Expand Down

0 comments on commit a7ec4fa

Please sign in to comment.