1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use phoenix::program::instruction_builders::create_request_seat_instruction;
use phoenix_sdk::sdk_client::*;
use solana_sdk::pubkey::Pubkey;

pub async fn process_request_seat(market_pubkey: &Pubkey, sdk: &SDKClient) -> anyhow::Result<()> {
    let ix = create_request_seat_instruction(&sdk.core.trader, market_pubkey);
    let tx = sdk.client.sign_send_instructions(vec![ix], vec![]).await;

    match tx {
        Ok(tx) => println!("Requested seat, transaction signature: {}", tx),
        Err(e) => println!("Error requesting seat: {}", e),
    }

    Ok(())
}