Skip to content

Commit ab596c5

Browse files
committed
Ensure CoinGecko API key is set
1 parent 988183d commit ab596c5

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

crates/shared/src/price_estimation/factory.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,11 @@ impl<'a> PriceEstimatorFactory<'a> {
226226
))
227227
}
228228
NativePriceEstimatorSource::CoinGecko => {
229+
anyhow::ensure!(
230+
self.args.coin_gecko.coin_gecko_api_key.is_some(),
231+
"coin_gecko_api_key must be set when CoinGecko is used as a native price estimator"
232+
);
233+
229234
let name = "CoinGecko".to_string();
230235
let coin_gecko = native::CoinGecko::new(
231236
self.components.http_factory.create(),

0 commit comments

Comments
 (0)