Skip to content

Commit

Permalink
small linting fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Defi-Moses committed Apr 23, 2024
1 parent 5dd88e5 commit d09c881
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions services/explorer/consumer/parser/rfqparser.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,24 +111,24 @@ func (p *RFQParser) MatureLogs(ctx context.Context, rfqEvent *model.RFQEvent, iF
timeStampBig := uint64(*timeStamp)
rfqEvent.TimeStamp = &timeStampBig

var curCoinGeckoId string
var curCoinGeckoID string
tokenAddressStr := common.HexToAddress(rfqEvent.OriginToken).Hex()
const ethAddress = "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee"

if strings.EqualFold(tokenAddressStr, ethAddress) {
rfqEvent.TokenSymbol = "ETH"
rfqEvent.TokenDecimal = new(uint8)
*rfqEvent.TokenDecimal = 18
curCoinGeckoId = ethCoinGeckoID
curCoinGeckoID = ethCoinGeckoID
} else {
// Assuming any other token is USDC
rfqEvent.TokenSymbol = "USDC"
rfqEvent.TokenDecimal = new(uint8)
*rfqEvent.TokenDecimal = 6
curCoinGeckoId = usdcCoinGeckoID
curCoinGeckoID = usdcCoinGeckoID
}
// find the price data for that specific token
p.applyPriceData(ctx, rfqEvent, curCoinGeckoId)
p.applyPriceData(ctx, rfqEvent, curCoinGeckoID)

// Would store into bridge database with a new goroutine but saw unreliable storage of events w/parent context cancellation.
bridgeEvent := rfqEventToBridgeEvent(*rfqEvent)
Expand Down

0 comments on commit d09c881

Please sign in to comment.