Revert "feat: swap support usdc quote"

This reverts commit 9bb08bd567.
This commit is contained in:
tommggo
2025-10-08 21:04:50 +08:00
parent 9bb08bd567
commit d567477bdb
10 changed files with 94 additions and 181 deletions
+5 -2
View File
@@ -28,8 +28,11 @@ impl GenericTradeExecutor {
impl TradeExecutor for GenericTradeExecutor {
async fn swap(&self, params: SwapParams) -> Result<(bool, Signature)> {
let start = Instant::now();
// Use trade_type directly to determine direction
let is_buy = matches!(params.trade_type, crate::swqos::TradeType::Buy);
// 暂时支持这三种。后续重构扩展builder 支持所有的 swap
let is_buy = params.input_mint == crate::constants::SOL_TOKEN_ACCOUNT
|| params.input_mint == crate::constants::WSOL_TOKEN_ACCOUNT
|| (params.input_mint == crate::constants::USD1_TOKEN_ACCOUNT
&& params.output_mint != crate::constants::WSOL_TOKEN_ACCOUNT);
// Build instructions directly from params to avoid unnecessary cloning
let instructions = if is_buy {
self.instruction_builder.build_buy_instructions(&params).await?