Skip to content

Commit

Permalink
remove payer from close ooa
Browse files Browse the repository at this point in the history
  • Loading branch information
binyebarwe committed Jan 4, 2024
1 parent fe243e2 commit 552b84e
Show file tree
Hide file tree
Showing 5 changed files with 1 addition and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ use anchor_lang::prelude::*;

#[derive(Accounts)]
pub struct CloseOpenOrdersAccount<'info> {
#[account(mut)]
pub payer: Signer<'info>,
pub owner: Signer<'info>,
#[account(
mut,
Expand Down
1 change: 1 addition & 0 deletions programs/openbook-v2/src/accounts_ix/place_order.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ pub struct PlaceOrder<'info> {
pub event_heap: AccountLoader<'info, EventHeap>,
#[account(
mut,
// The side of the vault is checked inside the ix
constraint = market.load()?.is_market_vault(market_vault.key())
)]
pub market_vault: Account<'info, TokenAccount>,
Expand Down
1 change: 0 additions & 1 deletion programs/openbook-v2/tests/cases/test_indexer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ async fn test_indexer() -> Result<(), TransportError> {
account_num: 2,
market,
owner,
payer,
sol_destination: owner.pubkey(),
},
)
Expand Down
2 changes: 0 additions & 2 deletions programs/openbook-v2/tests/program_test/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,6 @@ pub struct CloseOpenOrdersAccountInstruction {
pub account_num: u32,
pub market: Pubkey,
pub owner: TestKeypair,
pub payer: TestKeypair,
pub sol_destination: Pubkey,
}
#[async_trait::async_trait(?Send)]
Expand Down Expand Up @@ -261,7 +260,6 @@ impl ClientInstruction for CloseOpenOrdersAccountInstruction {

let accounts = openbook_v2::accounts::CloseOpenOrdersAccount {
owner: self.owner.pubkey(),
payer: self.payer.pubkey(),
open_orders_indexer,
open_orders_account,
sol_destination: self.sol_destination,
Expand Down
3 changes: 0 additions & 3 deletions ts/client/src/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -910,10 +910,8 @@ export class OpenBookV2Client {
}

public async closeOpenOrdersAccountIx(
payer: Keypair,
owner: Keypair = payer,
openOrdersPublicKey: PublicKey,
market: MarketAccount,
solDestination: PublicKey = this.walletPk,
openOrdersIndexer?: PublicKey,
): Promise<[TransactionInstruction, Signer[]]> {
Expand All @@ -924,7 +922,6 @@ export class OpenBookV2Client {
const ix = await this.program.methods
.closeOpenOrdersAccount()
.accounts({
payer: payer.publicKey,
owner: owner.publicKey,
openOrdersIndexer,
openOrdersAccount: openOrdersPublicKey,
Expand Down

0 comments on commit 552b84e

Please sign in to comment.