Skip to content

Commit

Permalink
linter does not want a switch here
Browse files Browse the repository at this point in the history
  • Loading branch information
winder committed Apr 5, 2024
1 parent f377f13 commit 0dd85a3
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions core/services/ocr2/plugins/ccip/tokendata/usdc/usdc.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,10 @@ const (
// this is set according to the APIs documentated 10 requests per second rate limit.
defaultRequestInterval = 100 * time.Millisecond

// APIIntervalRateLimitDisabled is a special value to disable the rate limiting.
APIIntervalRateLimitDisabled = -1
APIIntervalRateLimitDefault = 0
// APIIntervalRateLimitDefault is a special value to select the default rate limit interval.
APIIntervalRateLimitDefault = 0
)

type attestationStatus string
Expand Down Expand Up @@ -121,10 +123,9 @@ func NewUSDCTokenDataReader(
timeout = defaultAttestationTimeout
}

switch requestInterval {
case APIIntervalRateLimitDisabled:
if requestInterval == APIIntervalRateLimitDisabled {
requestInterval = 0
case APIIntervalRateLimitDefault:
} else if requestInterval == APIIntervalRateLimitDefault {
requestInterval = defaultRequestInterval
}

Expand Down

0 comments on commit 0dd85a3

Please sign in to comment.