Skip to content

Commit

Permalink
GetChequeOperators crash fix
Browse files Browse the repository at this point in the history
  • Loading branch information
sk263 committed Nov 26, 2024
1 parent 3db00a4 commit efe4409
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions pkg/cm_accounts/cm_accounts.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package cmaccounts
import (
"context"
"crypto/ecdsa"
"errors"
"fmt"
"math/big"

Expand Down Expand Up @@ -129,6 +130,11 @@ func (s *service) GetChequeOperators(ctx context.Context, cmAccountAddress commo
botsAddresses = append(botsAddresses, address)
}

if len(botsAddresses) == 0 {
s.logger.Error("No bot addresses found for CM account")
return nil, errors.New("no bot addresses found")
}

return botsAddresses, nil
}

Expand Down

0 comments on commit efe4409

Please sign in to comment.