Skip to content

Commit

Permalink
quote(): correctly serialize the dexes and excludeDexes query paramet…
Browse files Browse the repository at this point in the history
…ers (#17)
  • Loading branch information
mvines authored Jul 1, 2024
1 parent 07a447c commit ba93da3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ version = "0.7.1"
[dependencies]
base64 = "0.13"
bincode = "1"
itertools = "0.10"
reqwest = { version = "0.11", features = ["json"] }
serde = { version = "1", features = ["derive"] }
serde_json = "1"
Expand Down
12 changes: 5 additions & 7 deletions src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
use std::{env, fmt, str::FromStr};

use solana_sdk::transaction::VersionedTransaction;

use {
itertools::Itertools,
serde::{Deserialize, Serialize},
solana_sdk::transaction::VersionedTransaction,
solana_sdk::{
instruction::Instruction,
pubkey::{ParsePubkeyError, Pubkey},
},
std::collections::HashMap,
std::{collections::HashMap, env, fmt, str::FromStr},
};

mod field_as_string;
Expand Down Expand Up @@ -257,11 +255,11 @@ pub async fn quote(
.unwrap_or_default(),
quote_config
.dexes
.map(|dexes| format!("&dexes={:?}", dexes))
.map(|dexes| format!("&dexes={}", dexes.into_iter().join(",")))
.unwrap_or_default(),
quote_config
.exclude_dexes
.map(|exclude_dexes| format!("&excludeDexes={:?}", exclude_dexes))
.map(|exclude_dexes| format!("&excludeDexes={}", exclude_dexes.into_iter().join(",")))
.unwrap_or_default(),
quote_config
.max_accounts
Expand Down

0 comments on commit ba93da3

Please sign in to comment.