Skip to content

Commit

Permalink
fix token order bug in traderjoev2.1 scraper. add bridge in tbs.
Browse files Browse the repository at this point in the history
  • Loading branch information
jppade committed Sep 12, 2023
1 parent 8012b9c commit f56f289
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion cmd/exchange-scrapers/collector/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module github.com/diadata-org/diadata/exchange-scrapers/collector
go 1.17

require (
github.com/diadata-org/diadata v1.4.358
github.com/diadata-org/diadata v1.4.359
github.com/segmentio/kafka-go v0.4.35
github.com/sirupsen/logrus v1.9.0
)
Expand Down
2 changes: 1 addition & 1 deletion cmd/services/tradesBlockService/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module github.com/diadata-org/diadata/services/tradesBlockService
go 1.17

require (
github.com/diadata-org/diadata v1.4.324
github.com/diadata-org/diadata v1.4.359
github.com/segmentio/kafka-go v0.4.35
github.com/sirupsen/logrus v1.8.1
)
Expand Down
2 changes: 1 addition & 1 deletion internal/pkg/tradesBlockService/tradesBlockService.go
Original file line number Diff line number Diff line change
Expand Up @@ -581,7 +581,7 @@ func buildBridge(t dia.Trade) dia.Asset {
}
}
}
if basetoken.Blockchain == dia.ARBITRUM && (t.Source == dia.UniswapExchangeV3Arbitrum || t.Source == dia.SushiSwapExchangeArbitrum || t.Source == dia.CamelotExchange) {
if basetoken.Blockchain == dia.ARBITRUM && (t.Source == dia.UniswapExchangeV3Arbitrum || t.Source == dia.SushiSwapExchangeArbitrum || t.Source == dia.CamelotExchange || t.Source == dia.TraderJoeExchangeV2_1Arbitrum) {
if basetoken.Address == common.HexToAddress("0x82aF49447D8a07e3bd95BD0d56f35241523fBab1").Hex() {
basetoken = dia.Asset{
Symbol: "ETH",
Expand Down
4 changes: 2 additions & 2 deletions pkg/dia/scraper/exchange-scrapers/TraderJoeScraper.go
Original file line number Diff line number Diff line change
Expand Up @@ -391,8 +391,8 @@ func (tjs *TraderJoeScraper) sendTrade(traderjoeswap TraderJoeSwap, pool *Trader
t := &dia.Trade{
Symbol: pool.Token0.Symbol,
Pair: pool.ForeignName,
QuoteToken: token1,
BaseToken: token0,
QuoteToken: token0,
BaseToken: token1,
Price: price,
Volume: volume,
Time: time.Unix(0, traderjoeswap.Timestamp),
Expand Down

0 comments on commit f56f289

Please sign in to comment.