Skip to content

Commit 02e4b5c

Browse files
authored
Merge pull request #484 from icon-project/fix/grpc-issue
fix: cosmos grpc client not removed completely
2 parents bc10ea4 + 0edeb3b commit 02e4b5c

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

relayer/chains/wasm/client.go

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,11 +53,10 @@ type IClient interface {
5353

5454
type Client struct {
5555
ctx sdkClient.Context
56-
aq authTypes.QueryClient
5756
}
5857

5958
func newClient(ctx sdkClient.Context) *Client {
60-
return &Client{ctx, authTypes.NewQueryClient(ctx.GRPCClient)}
59+
return &Client{ctx}
6160
}
6261

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

104103
func (c *Client) GetTransactionReceipt(ctx context.Context, txHash string) (*txTypes.GetTxResponse, error) {
105-
serviceClient := txTypes.NewServiceClient(c.ctx.GRPCClient)
104+
serviceClient := txTypes.NewServiceClient(c.ctx)
106105
return serviceClient.GetTx(ctx, &txTypes.GetTxRequest{Hash: txHash})
107106
}
108107

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

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

0 commit comments

Comments
 (0)