Skip to content

Commit

Permalink
(fix) Fixed pre-commit issues
Browse files Browse the repository at this point in the history
  • Loading branch information
aarmoa committed Dec 10, 2024
1 parent 910af33 commit 8712c31
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 9 deletions.
1 change: 1 addition & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
],
"disabled-checks": [
"hugeParam",
"unnamedResult",
]
}
},
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -137,4 +137,4 @@ tests:
coverage:
go test -race -coverprofile=coverage.out -covermode=atomic ./client/... ./ethereum/...

.PHONY: copy-exchange-client tests coverage
.PHONY: copy-exchange-client tests coverage
8 changes: 4 additions & 4 deletions client/chain/chain.go
Original file line number Diff line number Diff line change
Expand Up @@ -387,9 +387,9 @@ func NewChainClient(
var err error
stickySessionEnabled := true
if opts.TLSCert != nil {
conn, err = grpc.Dial(network.ChainGrpcEndpoint, grpc.WithTransportCredentials(opts.TLSCert), grpc.WithContextDialer(common.DialerFunc))
conn, err = grpc.NewClient(network.ChainGrpcEndpoint, grpc.WithTransportCredentials(opts.TLSCert), grpc.WithContextDialer(common.DialerFunc))
} else {
conn, err = grpc.Dial(network.ChainGrpcEndpoint, grpc.WithTransportCredentials(insecure.NewCredentials()), grpc.WithContextDialer(common.DialerFunc))
conn, err = grpc.NewClient(network.ChainGrpcEndpoint, grpc.WithTransportCredentials(insecure.NewCredentials()), grpc.WithContextDialer(common.DialerFunc))
stickySessionEnabled = false
}
if err != nil {
Expand All @@ -399,9 +399,9 @@ func NewChainClient(

var chainStreamConn *grpc.ClientConn
if opts.TLSCert != nil {
chainStreamConn, err = grpc.Dial(network.ChainStreamGrpcEndpoint, grpc.WithTransportCredentials(opts.TLSCert), grpc.WithContextDialer(common.DialerFunc))
chainStreamConn, err = grpc.NewClient(network.ChainStreamGrpcEndpoint, grpc.WithTransportCredentials(opts.TLSCert), grpc.WithContextDialer(common.DialerFunc))
} else {
chainStreamConn, err = grpc.Dial(network.ChainStreamGrpcEndpoint, grpc.WithTransportCredentials(insecure.NewCredentials()), grpc.WithContextDialer(common.DialerFunc))
chainStreamConn, err = grpc.NewClient(network.ChainStreamGrpcEndpoint, grpc.WithTransportCredentials(insecure.NewCredentials()), grpc.WithContextDialer(common.DialerFunc))
}
if err != nil {
err = errors.Wrapf(err, "failed to connect to the chain stream gRPC: %s", network.ChainStreamGrpcEndpoint)
Expand Down
4 changes: 2 additions & 2 deletions client/exchange/exchange.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,10 +111,10 @@ func NewExchangeClient(network common.Network, options ...common.ClientOption) (
var conn *grpc.ClientConn
var err error
if opts.TLSCert != nil {
conn, err = grpc.Dial(network.ExchangeGrpcEndpoint, grpc.WithTransportCredentials(opts.TLSCert), grpc.WithContextDialer(common.DialerFunc))
conn, err = grpc.NewClient(network.ExchangeGrpcEndpoint, grpc.WithTransportCredentials(opts.TLSCert), grpc.WithContextDialer(common.DialerFunc))
} else {

conn, err = grpc.Dial(network.ExchangeGrpcEndpoint, grpc.WithTransportCredentials(insecure.NewCredentials()), grpc.WithContextDialer(common.DialerFunc))
conn, err = grpc.NewClient(network.ExchangeGrpcEndpoint, grpc.WithTransportCredentials(insecure.NewCredentials()), grpc.WithContextDialer(common.DialerFunc))
}
if err != nil {
err := errors.Wrapf(err, "failed to connect to the gRPC: %s", network.ExchangeGrpcEndpoint)
Expand Down
4 changes: 2 additions & 2 deletions client/explorer/explorer.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,9 @@ func NewExplorerClient(network common.Network, options ...common.ClientOption) (
var conn *grpc.ClientConn
var err error
if opts.TLSCert != nil {
conn, err = grpc.Dial(network.ExplorerGrpcEndpoint, grpc.WithTransportCredentials(opts.TLSCert), grpc.WithContextDialer(common.DialerFunc))
conn, err = grpc.NewClient(network.ExplorerGrpcEndpoint, grpc.WithTransportCredentials(opts.TLSCert), grpc.WithContextDialer(common.DialerFunc))
} else {
conn, err = grpc.Dial(network.ExplorerGrpcEndpoint, grpc.WithTransportCredentials(insecure.NewCredentials()), grpc.WithContextDialer(common.DialerFunc))
conn, err = grpc.NewClient(network.ExplorerGrpcEndpoint, grpc.WithTransportCredentials(insecure.NewCredentials()), grpc.WithContextDialer(common.DialerFunc))
}
if err != nil {
err := errors.Wrapf(err, "failed to connect to the gRPC: %s", network.ExplorerGrpcEndpoint)
Expand Down

0 comments on commit 8712c31

Please sign in to comment.