Skip to content

Commit

Permalink
divide by 0 check
Browse files Browse the repository at this point in the history
  • Loading branch information
golangisfun123 committed Oct 1, 2024
1 parent 353b63c commit bfd1761
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion services/rfq/relayer/limiter/limiter.go
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ func (l *limiterImpl) getNumberOfConfirmationsToWait(ctx context.Context, reques
}

volumeLimitForChain := l.cfg.GetVolumeLimit(int(request.Transaction.OriginChainId), request.Transaction.OriginToken)
if volumeLimitForChain.Cmp(big.NewInt(-1)) == 0 {
if volumeLimitForChain.Cmp(big.NewInt(-1)) == 0 || volumeLimitForChain.Cmp(big.NewInt(0)) == 0 {
return 0, nil
}

Expand Down

0 comments on commit bfd1761

Please sign in to comment.