From fe9800315484e1b24d4ef17b1159e3ffaa8dcf2d Mon Sep 17 00:00:00 2001 From: hanssun123 Date: Mon, 27 Feb 2023 18:29:25 -0400 Subject: [PATCH] Fix: portfolio stream method naming convention --- client/exchange/exchange.go | 4 ++-- .../portfolio/2_StreamAccountPortfolioBankBalances/example.go | 2 +- .../3_StreamAccountPortfolioSubaccountBalances/example.go | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/client/exchange/exchange.go b/client/exchange/exchange.go index 9011f3a7..704e5246 100644 --- a/client/exchange/exchange.go +++ b/client/exchange/exchange.go @@ -80,7 +80,7 @@ type ExchangeClient interface { GetRedemptions(ctx context.Context, req insurancePB.RedemptionsRequest) (insurancePB.RedemptionsResponse, error) GetAccountPortfolio(ctx context.Context, accountAddress string) (portfolioExchangePB.AccountPortfolioResponse, error) - GetStreamAccountPortfolio(ctx context.Context, accountAddress string, subaccountId, balanceType string) (portfolioExchangePB.InjectivePortfolioRPC_StreamAccountPortfolioClient, error) + StreamAccountPortfolio(ctx context.Context, accountAddress string, subaccountId, balanceType string) (portfolioExchangePB.InjectivePortfolioRPC_StreamAccountPortfolioClient, error) StreamKeepalive(ctx context.Context) (metaPB.InjectiveMetaRPC_StreamKeepaliveClient, error) GetInfo(ctx context.Context, req metaPB.InfoRequest) (metaPB.InfoResponse, error) @@ -1125,7 +1125,7 @@ func (c *exchangeClient) GetAccountPortfolio(ctx context.Context, accountAddress return *res, nil } -func (c *exchangeClient) GetStreamAccountPortfolio(ctx context.Context, accountAddress string, subaccountId, balanceType string) (portfolioExchangePB.InjectivePortfolioRPC_StreamAccountPortfolioClient, error) { +func (c *exchangeClient) StreamAccountPortfolio(ctx context.Context, accountAddress string, subaccountId, balanceType string) (portfolioExchangePB.InjectivePortfolioRPC_StreamAccountPortfolioClient, error) { var header metadata.MD ctx = c.getCookie(ctx) stream, err := c.portfolioExchangeClient.StreamAccountPortfolio(ctx, &portfolioExchangePB.StreamAccountPortfolioRequest{ diff --git a/examples/exchange/portfolio/2_StreamAccountPortfolioBankBalances/example.go b/examples/exchange/portfolio/2_StreamAccountPortfolioBankBalances/example.go index 73a629b7..78edce1c 100644 --- a/examples/exchange/portfolio/2_StreamAccountPortfolioBankBalances/example.go +++ b/examples/exchange/portfolio/2_StreamAccountPortfolioBankBalances/example.go @@ -19,7 +19,7 @@ func main() { ctx := context.Background() - stream, err := exchangeClient.GetStreamAccountPortfolio(ctx, "inj1clw20s2uxeyxtam6f7m84vgae92s9eh7vygagt", "", "") + stream, err := exchangeClient.StreamAccountPortfolio(ctx, "inj1clw20s2uxeyxtam6f7m84vgae92s9eh7vygagt", "", "") if err != nil { fmt.Println(err) } diff --git a/examples/exchange/portfolio/3_StreamAccountPortfolioSubaccountBalances/example.go b/examples/exchange/portfolio/3_StreamAccountPortfolioSubaccountBalances/example.go index f69d129a..29b9a47c 100644 --- a/examples/exchange/portfolio/3_StreamAccountPortfolioSubaccountBalances/example.go +++ b/examples/exchange/portfolio/3_StreamAccountPortfolioSubaccountBalances/example.go @@ -19,7 +19,7 @@ func main() { ctx := context.Background() - stream, err := exchangeClient.GetStreamAccountPortfolio(ctx, "inj1clw20s2uxeyxtam6f7m84vgae92s9eh7vygagt", "0xc7dca7c15c364865f77a4fb67ab11dc95502e6fe000000000000000000000001", "total_balances") + stream, err := exchangeClient.StreamAccountPortfolio(ctx, "inj1clw20s2uxeyxtam6f7m84vgae92s9eh7vygagt", "0xc7dca7c15c364865f77a4fb67ab11dc95502e6fe000000000000000000000001", "total_balances") if err != nil { fmt.Println(err) }