Skip to content

Commit

Permalink
Fix linter
Browse files Browse the repository at this point in the history
  • Loading branch information
WertND committed Sep 5, 2024
1 parent ad74e49 commit bffb874
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions internal/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ func (a *Application) initServices() error {
}

func (a *Application) initEnsResolver(pb *natsclient.Publisher) error {
conn, err := grpc.Dial(a.cfg.InternalAPI.EnsResolverAddress, grpc.WithTransportCredentials(insecure.NewCredentials()))
conn, err := grpc.NewClient(a.cfg.InternalAPI.EnsResolverAddress, grpc.WithTransportCredentials(insecure.NewCredentials()))
if err != nil {
return fmt.Errorf("create connection with ens resolver: %v", err)
}
Expand Down Expand Up @@ -269,7 +269,7 @@ func (a *Application) initProposal(nc *nats.Conn, pb *natsclient.Publisher) erro
}

func (a *Application) initVote(nc *nats.Conn, pb *natsclient.Publisher) error {
dsConn, err := grpc.Dial(
dsConn, err := grpc.NewClient(
a.cfg.InternalAPI.DatasourceSnapshotAddress,
grpc.WithTransportCredentials(insecure.NewCredentials()),
)
Expand Down
6 changes: 3 additions & 3 deletions internal/delegate/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ func (s *Service) GetDelegates(ctx context.Context, request GetDelegatesRequest)
return nil, fmt.Errorf("failed to get dao: %w", err)
}

delegationStrategyJson, err := s.getDelegationStrategy(daoEntity, err)
delegationStrategyJson, err := s.getDelegationStrategy(daoEntity)
if err != nil {
return nil, fmt.Errorf("failed to get delegation strategy: %w", err)
}
Expand Down Expand Up @@ -111,7 +111,7 @@ func (s *Service) GetDelegateProfile(ctx context.Context, request GetDelegatePro
return GetDelegateProfileResponse{}, fmt.Errorf("failed to get dao: %w", err)
}

delegationStrategyJson, err := s.getDelegationStrategy(daoEntity, err)
delegationStrategyJson, err := s.getDelegationStrategy(daoEntity)
if err != nil {
return GetDelegateProfileResponse{}, fmt.Errorf("failed to get delegation strategy: %w", err)
}
Expand Down Expand Up @@ -164,7 +164,7 @@ func (s *Service) GetDelegateProfile(ctx context.Context, request GetDelegatePro
}, nil
}

func (s *Service) getDelegationStrategy(daoEntity *dao.Dao, err error) ([]byte, error) {
func (s *Service) getDelegationStrategy(daoEntity *dao.Dao) ([]byte, error) {
var delegationStrategy *dao.Strategy
for _, strategy := range daoEntity.Strategies {
if strategy.Name == "split-delegation" {
Expand Down

0 comments on commit bffb874

Please sign in to comment.