We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6998827 commit a31a72bCopy full SHA for a31a72b
pkg/strategy/autoborrow/alert_interest_rate.go
@@ -235,14 +235,15 @@ func (w *MarginHighInterestRateWorker) Run(ctx context.Context) {
235
continue
236
}
237
238
- rate := rateMap[cur]
239
- debtValue := bal.Debt().Mul(price)
240
- nextTotalInterestValue = nextTotalInterestValue.Add(
241
- debtValue.Mul(rate.HourlyRate))
242
-
243
- if w.config.MinDebtAmount.Sign() > 0 &&
244
- debtValue.Compare(w.config.MinDebtAmount) > 0 {
245
- exceededDebtAmount = true
+ if rate, ok := rateMap[cur]; ok {
+ debtValue := bal.Debt().Mul(price)
+ nextTotalInterestValue = nextTotalInterestValue.Add(
+ debtValue.Mul(rate.HourlyRate))
+
+ if w.config.MinDebtAmount.Sign() > 0 &&
+ debtValue.Compare(w.config.MinDebtAmount) > 0 {
+ exceededDebtAmount = true
246
+ }
247
248
249
0 commit comments