mirror of
https://github.com/getAlby/hub.git
synced 2026-08-13 12:33:39 +02:00
fix: continue instead of return during auto swap check (#1537)
This commit is contained in:
parent
63f41887c7
commit
b05f3ca0bd
1 changed files with 2 additions and 2 deletions
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue