mirror of
https://github.com/d0zingcat/ore.git
synced 2026-05-13 23:16:52 +00:00
cleanup
This commit is contained in:
@@ -19,7 +19,6 @@ default = []
|
||||
|
||||
[dependencies]
|
||||
bincode.workspace = true
|
||||
meteora-pools-sdk.workspace = true
|
||||
mpl-token-metadata.workspace = true
|
||||
ore-api.workspace = true
|
||||
ore-boost-api.workspace = true
|
||||
|
||||
@@ -45,7 +45,7 @@ pub fn process_close(accounts: &[AccountInfo<'_>], _data: &[u8]) -> ProgramResul
|
||||
mint_base_info,
|
||||
market_info,
|
||||
token_program,
|
||||
market_hash.amount(),
|
||||
vault_base.amount(),
|
||||
&[MARKET, &market.id.to_le_bytes()],
|
||||
)?;
|
||||
|
||||
|
||||
@@ -24,11 +24,11 @@ pub fn process_swap(accounts: &[AccountInfo<'_>], data: &[u8]) -> ProgramResult
|
||||
.as_account_mut::<Market>(&ore_api::ID)?
|
||||
.assert_mut(|m| m.id == block.id)?
|
||||
.assert_mut_err(
|
||||
|m| m.base.reserves() > 0,
|
||||
|m| m.base.liquidity() > 0,
|
||||
OreError::InsufficientLiquidity.into(),
|
||||
)?
|
||||
.assert_mut_err(
|
||||
|m| m.quote.reserves() > 0,
|
||||
|m| m.quote.liquidity() > 0,
|
||||
OreError::InsufficientLiquidity.into(),
|
||||
)?;
|
||||
mint_base_info.has_address(&market.base.mint)?.as_mint()?;
|
||||
|
||||
Reference in New Issue
Block a user