From 02d5272acebecedfde500c179cc128761ceaf704 Mon Sep 17 00:00:00 2001 From: Morty Date: Tue, 8 Oct 2024 17:31:42 +0800 Subject: [PATCH] fix: lint --- rollup/internal/controller/relayer/l1_relayer.go | 1 + rollup/internal/utils/exchange_rate.go | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/rollup/internal/controller/relayer/l1_relayer.go b/rollup/internal/controller/relayer/l1_relayer.go index 93bbfd068..ef3e1faa5 100644 --- a/rollup/internal/controller/relayer/l1_relayer.go +++ b/rollup/internal/controller/relayer/l1_relayer.go @@ -16,6 +16,7 @@ import ( "scroll-tech/common/types" "scroll-tech/common/utils" + rutils "scroll-tech/rollup/internal/utils" bridgeAbi "scroll-tech/rollup/abi" diff --git a/rollup/internal/utils/exchange_rate.go b/rollup/internal/utils/exchange_rate.go index c3263ff98..85a36750f 100644 --- a/rollup/internal/utils/exchange_rate.go +++ b/rollup/internal/utils/exchange_rate.go @@ -6,6 +6,8 @@ import ( "io" "net/http" "strconv" + + "github.com/scroll-tech/go-ethereum/log" ) var BinanceApiEndpoint string = "https://api.binance.com/api/v3/ticker/price?symbol=%s" @@ -21,9 +23,9 @@ func GetExchangeRateFromBinanceApi(tokenSymbolPair string) (float64, error) { return 0, fmt.Errorf("error making HTTP request: %w", err) } defer func() { - err = resp.Body.Close() + err := resp.Body.Close() if err != nil { - fmt.Println("error closing response body:", err) + log.Error("error closing response body", "err", err) } }()