Skip to content

Commit

Permalink
fix: lint
Browse files Browse the repository at this point in the history
  • Loading branch information
yiweichi committed Oct 8, 2024
1 parent 859195e commit 02d5272
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions rollup/internal/controller/relayer/l1_relayer.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import (

"scroll-tech/common/types"
"scroll-tech/common/utils"

rutils "scroll-tech/rollup/internal/utils"

bridgeAbi "scroll-tech/rollup/abi"
Expand Down
6 changes: 4 additions & 2 deletions rollup/internal/utils/exchange_rate.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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)
}
}()

Expand Down

0 comments on commit 02d5272

Please sign in to comment.