Skip to content

Commit

Permalink
minor refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
solonk8 committed Mar 14, 2024
1 parent 4951775 commit 224d2f7
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 8 deletions.
4 changes: 2 additions & 2 deletions programs/mmm/src/instructions/ext_vanilla/ext_fulfill_buy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -302,8 +302,8 @@ pub fn handler<'info>(
if shared_escrow_account.lamports() + buyside_sol_escrow_account.lamports() > min_rent
&& buyside_sol_escrow_account.lamports() > 0
{
anchor_lang::solana_program::program::invoke_signed(
&anchor_lang::solana_program::system_instruction::transfer(
invoke_signed(
&system_instruction::transfer(
buyside_sol_escrow_account.key,
shared_escrow_account.key,
buyside_sol_escrow_account.lamports(),
Expand Down
5 changes: 3 additions & 2 deletions programs/mmm/src/instructions/ext_vanilla/ext_fulfill_sell.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ use crate::{
constants::*,
errors::MMMErrorCode,
instructions::{
get_pool_price_info, log_pool, try_close_pool, try_close_sell_state, PoolPriceInfo,
get_sell_fulfill_pool_price_info, log_pool, try_close_pool, try_close_sell_state,
PoolPriceInfo,
},
state::{Pool, SellState},
util::check_allowlists_for_mint_ext,
Expand Down Expand Up @@ -125,7 +126,7 @@ pub fn handler<'info>(
taker_fee,
referral_fee,
transfer_sol_to,
} = get_pool_price_info(
} = get_sell_fulfill_pool_price_info(
pool,
owner,
buyside_sol_escrow_account,
Expand Down
2 changes: 1 addition & 1 deletion programs/mmm/src/instructions/ext_vanilla/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ pub mod ext_deposit_sell;
pub mod ext_fulfill_buy;
pub mod ext_fulfill_sell;

pub use ext_fulfill_buy::*;
pub use ext_deposit_sell::*;
pub use ext_fulfill_buy::*;
pub use ext_fulfill_sell::*;
4 changes: 2 additions & 2 deletions programs/mmm/src/instructions/vanilla/sol_fulfill_sell.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use std::convert::TryFrom;
use crate::{
constants::*,
errors::MMMErrorCode,
instructions::{get_pool_price_info, PoolPriceInfo},
instructions::{get_sell_fulfill_pool_price_info, PoolPriceInfo},
state::{Pool, SellState},
util::{
check_allowlists_for_mint, get_metadata_royalty_bp, log_pool, pay_creator_fees_in_sol,
Expand Down Expand Up @@ -151,7 +151,7 @@ pub fn handler<'info>(
taker_fee,
referral_fee,
transfer_sol_to,
} = get_pool_price_info(
} = get_sell_fulfill_pool_price_info(
pool,
owner,
buyside_sol_escrow_account,
Expand Down
2 changes: 1 addition & 1 deletion programs/mmm/src/util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -774,7 +774,7 @@ pub struct PoolPriceInfo<'info> {
pub transfer_sol_to: AccountInfo<'info>,
}

pub fn get_pool_price_info<'info>(
pub fn get_sell_fulfill_pool_price_info<'info>(
pool: &Pool,
owner: &UncheckedAccount<'info>,
buyside_sol_escrow_account: &AccountInfo<'info>,
Expand Down

0 comments on commit 224d2f7

Please sign in to comment.