synapsecns/sanguine

View on GitHub
services/rfq/relayer/reldb/base/rebalance.go

Summary

Maintainability
A
1 hr
Test Coverage

Method Store.UpdateLatestRebalance has 7 return statements (exceeds 4 allowed).
Open

func (s Store) UpdateLatestRebalance(ctx context.Context, rebalance reldb.Rebalance) error {
    tx := s.DB().WithContext(ctx).Begin()
    if tx.Error != nil {
        return fmt.Errorf("could not start transaction: %w", tx.Error)
    }
Severity: Major
Found in services/rfq/relayer/reldb/base/rebalance.go - About 45 mins to fix

    Method Store.UpdateRebalance has 6 return statements (exceeds 4 allowed).
    Open

    func (s Store) UpdateRebalance(ctx context.Context, rebalance reldb.Rebalance, updateID bool) error {
        tx := s.DB().WithContext(ctx).Begin()
        if tx.Error != nil {
            return fmt.Errorf("could not start transaction: %w", tx.Error)
        }
    Severity: Major
    Found in services/rfq/relayer/reldb/base/rebalance.go - About 40 mins to fix

      There are no issues that match your filters.

      Category
      Status