Skip to content

Commit

Permalink
fix: get rid of import cycle on tests
Browse files Browse the repository at this point in the history
  • Loading branch information
maharifu committed Oct 3, 2024
1 parent 85666b1 commit e7cdf1c
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions chain/paloma/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,19 +19,14 @@ import (
"github.com/palomachain/pigeon/util/slice"
)

type (
ResultStatus = coretypes.ResultStatus
Unpacker = codectypes.AnyUnpacker
)

//go:generate mockery --name=MessageSender
type MessageSender interface {
SendMsg(ctx context.Context, msg sdk.Msg, memo string, opts ...ion.SendMsgOption) (*sdk.TxResponse, error)
}

//go:generate mockery --name=IonClient
type IonClient interface {
Status(context.Context) (*ResultStatus, error)
Status(context.Context) (*coretypes.ResultStatus, error)
DecodeBech32ValAddr(string) (sdk.ValAddress, error)
GetKeybase() keyring.Keyring
SetSDKContext() func()
Expand All @@ -43,7 +38,7 @@ type Client struct {
GRPCClient grpc.ClientConn

ic IonClient
unpacker Unpacker
unpacker codectypes.AnyUnpacker
messageSender MessageSender
sendingOpts []ion.SendMsgOption

Expand Down Expand Up @@ -214,7 +209,7 @@ func (c *Client) KeepValidatorAlive(ctx context.Context, appVersion string) erro
return err
}

func (c *Client) Status(ctx context.Context) (*ResultStatus, error) {
func (c *Client) Status(ctx context.Context) (*coretypes.ResultStatus, error) {
res, err := c.ic.Status(ctx)
if err != nil {
return nil, err
Expand Down

0 comments on commit e7cdf1c

Please sign in to comment.