Skip to content

Commit 31c05bf

Browse files
committed
chore: linter fixes
1 parent ee74c4b commit 31c05bf

File tree

7 files changed

+13
-3
lines changed

7 files changed

+13
-3
lines changed

.golangci.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ run:
44
concurrency: 0
55
timeout: 10m
66
issues-exit-code: 1
7-
tests: true
7+
tests: false
88

99
output:
1010
formats:
@@ -32,6 +32,7 @@ linters:
3232
# You can't disable typecheck, see:
3333
# https://github.com/golangci/golangci-lint/blob/master/docs/src/docs/welcome/faq.mdx#why-do-you-have-typecheck-errors
3434
- unconvert
35+
- bodyclose
3536
settings:
3637
errcheck:
3738
check-type-assertions: false
@@ -46,6 +47,9 @@ linters:
4647
goconst:
4748
min-len: 3
4849
min-occurrences: 2
50+
gosec:
51+
excludes:
52+
- G115
4953

5054
formatters:
5155
exclusions:

pkg/gas/ethclient.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import (
77
"math/big"
88

99
"github.com/ethereum/go-ethereum"
10+
1011
"github.com/status-im/go-wallet-sdk/pkg/ethclient"
1112
)
1213

pkg/gas/gasprice_linea.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import (
66

77
"github.com/ethereum/go-ethereum"
88
gethcommon "github.com/ethereum/go-ethereum/common"
9+
910
"github.com/status-im/go-wallet-sdk/pkg/ethclient"
1011
)
1112

pkg/gas/infura/client.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,9 @@ func (c *Client) GetGasSuggestions(ctx context.Context, networkID int) (*GasResp
4848
if err != nil {
4949
return nil, fmt.Errorf("failed to make request: %w", err)
5050
}
51-
defer resp.Body.Close()
51+
defer func() {
52+
_ = resp.Body.Close()
53+
}()
5254

5355
if resp.StatusCode != http.StatusOK {
5456
body, _ := io.ReadAll(resp.Body)

pkg/gas/suggestions_linea.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import (
77
"slices"
88

99
"github.com/ethereum/go-ethereum"
10+
1011
"github.com/status-im/go-wallet-sdk/pkg/ethclient"
1112
)
1213

pkg/gas/txgas.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,5 @@ func estimateTxGas(ctx context.Context, ethClient EthClient, callMsg *ethereum.C
1212
if err != nil {
1313
return nil, err
1414
}
15-
return big.NewInt(int64(gasUsed)), nil
15+
return big.NewInt(0).SetUint64(gasUsed), nil
1616
}

pkg/gas/txgas_linea.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import (
44
"context"
55

66
"github.com/ethereum/go-ethereum"
7+
78
"github.com/status-im/go-wallet-sdk/pkg/ethclient"
89
)
910

0 commit comments

Comments
 (0)