v0.2.11-pre.010
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
// file: crates/ksp-config-lib/src/offchain_transport.rs
|
||||
// version: 1
|
||||
// version: 2
|
||||
|
||||
//! Adapter from Config-owned Off-chain Transport documents to the provider-agnostic market-price runtime service.
|
||||
|
||||
@@ -322,6 +322,13 @@ fn map_coingecko(
|
||||
ksp_offchain_transport_lib::MarketPriceCoinGeckoAccessMode::Keyless => {
|
||||
ksp_offchain_transport_lib::MarketPriceCoinGeckoSettings::keyless(source.enabled)
|
||||
},
|
||||
_ => {
|
||||
return std::result::Result::Err(
|
||||
effective_error(profile, "Off-chain Transport CoinGecko access mode is not supported by this Config adapter")
|
||||
.with_context("provider", "coingecko")
|
||||
.with_context("field", "access_mode"),
|
||||
);
|
||||
},
|
||||
};
|
||||
return match settings {
|
||||
std::result::Result::Ok(value) => std::result::Result::Ok(value),
|
||||
@@ -346,6 +353,13 @@ fn map_coinmarketcap(
|
||||
ksp_offchain_transport_lib::MarketPriceCoinMarketCapAccessMode::Keyless => {
|
||||
ksp_offchain_transport_lib::MarketPriceCoinMarketCapSettings::keyless(source.enabled)
|
||||
},
|
||||
_ => {
|
||||
return std::result::Result::Err(
|
||||
effective_error(profile, "Off-chain Transport CoinMarketCap access mode is not supported by this Config adapter")
|
||||
.with_context("provider", "coinmarketcap")
|
||||
.with_context("field", "access_mode"),
|
||||
);
|
||||
},
|
||||
};
|
||||
return match settings {
|
||||
std::result::Result::Ok(value) => std::result::Result::Ok(value),
|
||||
@@ -386,6 +400,13 @@ fn map_jupiter(
|
||||
ksp_offchain_transport_lib::MarketPriceJupiterSettings::free(source.enabled, source.api_key)
|
||||
},
|
||||
ksp_offchain_transport_lib::MarketPriceJupiterAccessMode::Keyless => ksp_offchain_transport_lib::MarketPriceJupiterSettings::keyless(source.enabled),
|
||||
_ => {
|
||||
return std::result::Result::Err(
|
||||
effective_error(profile, "Off-chain Transport Jupiter access mode is not supported by this Config adapter")
|
||||
.with_context("provider", "jupiter")
|
||||
.with_context("field", "access_mode"),
|
||||
);
|
||||
},
|
||||
};
|
||||
return match settings {
|
||||
std::result::Result::Ok(value) => std::result::Result::Ok(value),
|
||||
|
||||
Reference in New Issue
Block a user