Skip to content

Commit

Permalink
fix: Don't fail the entire provider when one asset is missing (backport
Browse files Browse the repository at this point in the history
#262) (#264)

* fix: Don't fail the entire provider when one asset is missing (#262)

* dont fail the entire provider when one asset is missing

(cherry picked from commit 54b49cd)

# Conflicts:
#	ojo-provider-config/endpoints.toml

* backport merge conflict

---------

Co-authored-by: Kyle <[email protected]>
  • Loading branch information
mergify[bot] and zarazan authored Sep 13, 2023
1 parent b1e07c1 commit 2920239
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions oracle/oracle.go
Original file line number Diff line number Diff line change
Expand Up @@ -234,8 +234,7 @@ func (o *Oracle) SetPrices(ctx context.Context) error {
for _, pair := range currencyPairs {
success := SetProviderTickerPricesAndCandles(providerName, providerPrices, providerCandles, prices, candles, pair)
if !success {
mtx.Unlock()
return fmt.Errorf("failed to find any exchange rates in provider responses")
o.logger.Err(fmt.Errorf("failed to find any ticker or candle data for %s from %s", pair, providerName)).Send()
}
}

Expand Down

0 comments on commit 2920239

Please sign in to comment.