Skip to content

Commit

Permalink
feat: Update uniswap provider to use new websocket api (#308)
Browse files Browse the repository at this point in the history
* replace uniswap provider with new websocket api

(cherry picked from commit 9ca4545)

# Conflicts:
#	ojo-provider-config/endpoints.toml
#	oracle/provider/uniswap_test.go
#	umee-provider-config/currency-pairs.toml
  • Loading branch information
zarazan authored and mergify[bot] committed Nov 13, 2023
1 parent f7231fd commit 6e05566
Show file tree
Hide file tree
Showing 7 changed files with 345 additions and 665 deletions.
3 changes: 3 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,9 @@ issues:
- path: _test\.go
linters:
- gosec
- path: oracle/provider/*
linters:
- gosec
- linters:
- lll
source: "https://"
Expand Down
4 changes: 4 additions & 0 deletions ojo-provider-config/endpoints.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[[provider_endpoints]]
name = "binance"
rest = "https://api1.binance.com"
websocket = "stream.binance.com:9443"
2 changes: 1 addition & 1 deletion oracle/oracle.go
Original file line number Diff line number Diff line change
Expand Up @@ -474,7 +474,7 @@ func NewProvider(
return provider.NewMockProvider(), nil

case provider.ProviderEthUniswap:
return provider.NewUniswapProvider(ctx, logger, providerName.String(), endpoint, providerPairs...), nil
return provider.NewUniswapProvider(ctx, logger, endpoint, providerPairs...)
}

return nil, fmt.Errorf("provider %s not found", providerName)
Expand Down
Loading

0 comments on commit 6e05566

Please sign in to comment.