Skip to content

Commit

Permalink
Merge pull request #484 from icon-project/fix/grpc-issue
Browse files Browse the repository at this point in the history
fix: cosmos grpc client not removed completely
  • Loading branch information
sherpalden authored Feb 6, 2025
2 parents bc10ea4 + 0edeb3b commit 02e4b5c
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions relayer/chains/wasm/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,10 @@ type IClient interface {

type Client struct {
ctx sdkClient.Context
aq authTypes.QueryClient
}

func newClient(ctx sdkClient.Context) *Client {
return &Client{ctx, authTypes.NewQueryClient(ctx.GRPCClient)}
return &Client{ctx}
}

func (c *Client) BuildTxFactory() (tx.Factory, error) {
Expand Down Expand Up @@ -102,12 +101,12 @@ func (c *Client) GetLatestBlockHeight(ctx context.Context) (uint64, error) {
}

func (c *Client) GetTransactionReceipt(ctx context.Context, txHash string) (*txTypes.GetTxResponse, error) {
serviceClient := txTypes.NewServiceClient(c.ctx.GRPCClient)
serviceClient := txTypes.NewServiceClient(c.ctx)
return serviceClient.GetTx(ctx, &txTypes.GetTxRequest{Hash: txHash})
}

func (c *Client) GetBalance(ctx context.Context, addr string, denomination string) (*sdkTypes.Coin, error) {
queryClient := bankTypes.NewQueryClient(c.ctx.GRPCClient)
queryClient := bankTypes.NewQueryClient(c.ctx)

res, err := queryClient.Balance(ctx, &bankTypes.QueryBalanceRequest{
Address: addr,
Expand Down

0 comments on commit 02e4b5c

Please sign in to comment.