synapsecns/sanguine

View on GitHub
contrib/promexporter/exporters/relayer.go

Summary

Maintainability
A
1 hr
Test Coverage

Method exporter.fetchRelayerBalances has 54 lines of code (exceeds 50 allowed). Consider refactoring.
Open

func (e *exporter) fetchRelayerBalances(ctx context.Context, url string) error {
    // Fetch relayer addresses
    quotes, err := e.fetchAllQuotes(ctx, url)
    if err != nil {
        return fmt.Errorf("could not fetch relayer addresses: %w", err)
Severity: Minor
Found in contrib/promexporter/exporters/relayer.go - About 1 hr to fix

    Method exporter.fetchAllQuotes has 5 return statements (exceeds 4 allowed).
    Open

    func (e *exporter) fetchAllQuotes(ctx context.Context, url string) ([]rfqAPIModel.GetQuoteResponse, error) {
        req, err := http.NewRequestWithContext(ctx, http.MethodGet, url, nil)
        if err != nil {
            return nil, fmt.Errorf("could not get quotes: %w", err)
        }
    Severity: Major
    Found in contrib/promexporter/exporters/relayer.go - About 35 mins to fix

      There are no issues that match your filters.

      Category
      Status