Using config in engine

This commit is contained in:
2026-07-24 16:50:36 +02:00
parent bba94e244c
commit ae37c02adc
4 changed files with 18 additions and 13 deletions
+2 -2
View File
@@ -12,7 +12,7 @@ fn number(value: &Value, field: &str) -> Result<f64, String> {
.map_err(|error| format!("could not parse asset context field {field} ({raw}): {error}"))
}
pub async fn fetch_watch_list(symbols: &[&str]) -> Result<Vec<WatchListItem>, String> {
pub async fn fetch_watch_list(symbols: &[String]) -> Result<Vec<WatchListItem>, String> {
let response = hypersdk::hypercore::mainnet()
.meta_and_asset_ctxs(None)
.await
@@ -73,7 +73,7 @@ pub async fn fetch_watch_list(symbols: &[&str]) -> Result<Vec<WatchListItem>, St
.iter()
.map(|symbol| {
by_symbol
.remove(*symbol)
.remove(symbol.as_str())
.ok_or_else(|| format!("{symbol} is not in the Hyperliquid perpetual universe"))
})
.collect()