Skip to content

Commit

Permalink
Probe pools consistently
Browse files Browse the repository at this point in the history
  • Loading branch information
mvines committed Jun 14, 2024
1 parent b99fbb0 commit e8a8d3e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/bin/sys-lend.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1110,9 +1110,13 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
let maybe_token = MaybeToken::from(value_t!(matches, "token", Token).ok());
let token = maybe_token.token().unwrap_or(Token::wSOL);

let pools = values_t!(matches, "pool", String)
let pools = {
let mut pools = values_t!(matches, "pool", String)
.ok()
.unwrap_or_else(|| supported_pools_for_token(token));
pools.sort();
pools
};

is_token_supported(&token, &pools)?;

Expand Down

0 comments on commit e8a8d3e

Please sign in to comment.