@@ -53,11 +53,10 @@ impl InstructionBuilder for PumpSwapInstructionBuilder {
|
||||
let pool_base_token_account = protocol_params.pool_base_token_account;
|
||||
let pool_quote_token_account = protocol_params.pool_quote_token_account;
|
||||
|
||||
// Only support WSOL or USDC as quote mint for now
|
||||
if quote_mint != crate::constants::WSOL_TOKEN_ACCOUNT
|
||||
&& quote_mint != crate::constants::USDC_TOKEN_ACCOUNT
|
||||
if base_mint != crate::constants::WSOL_TOKEN_ACCOUNT
|
||||
&& quote_mint != crate::constants::WSOL_TOKEN_ACCOUNT
|
||||
{
|
||||
return Err(anyhow!("Unsupported quote mint for PumpSwap"));
|
||||
return Err(anyhow!("Invalid base mint and quote mint"));
|
||||
}
|
||||
|
||||
// ========================================
|
||||
@@ -220,11 +219,10 @@ impl InstructionBuilder for PumpSwapInstructionBuilder {
|
||||
let base_token_program = protocol_params.base_token_program;
|
||||
let quote_token_program = protocol_params.quote_token_program;
|
||||
|
||||
// Only support WSOL or USDC as quote mint for now
|
||||
if quote_mint != crate::constants::WSOL_TOKEN_ACCOUNT
|
||||
&& quote_mint != crate::constants::USDC_TOKEN_ACCOUNT
|
||||
if base_mint != crate::constants::WSOL_TOKEN_ACCOUNT
|
||||
&& quote_mint != crate::constants::WSOL_TOKEN_ACCOUNT
|
||||
{
|
||||
return Err(anyhow!("Unsupported quote mint for PumpSwap"));
|
||||
return Err(anyhow!("Invalid base mint and quote mint"));
|
||||
}
|
||||
if params.input_amount.is_none() {
|
||||
return Err(anyhow!("Token amount is not set"));
|
||||
|
||||
Reference in New Issue
Block a user