fix: continue instead of return during auto swap check (#1537)

This commit is contained in:
Adithya Vardhan 2025-07-24 20:22:03 +05:30 committed by GitHub
parent 63f41887c7
commit b05f3ca0bd
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -199,13 +199,13 @@ func (svc *swapsService) EnableAutoSwapOut() error {
balance, err := svc.lnClient.GetBalances(ctx, false)
if err != nil {
logger.Logger.WithError(err).Error("Failed to get balance")
return
continue
}
lightningBalance := uint64(balance.Lightning.TotalSpendable)
balanceThresholdMilliSats := balanceThreshold * 1000
if lightningBalance < balanceThresholdMilliSats {
logger.Logger.Info("Threshold requirements not met for swap, ignoring")
return
continue
}
logger.Logger.WithFields(logrus.Fields{
"amount": amount,