Skip to content

Commit

Permalink
add QueryMetokenIndexPrices
Browse files Browse the repository at this point in the history
  • Loading branch information
robert-zaremba committed Sep 21, 2023
1 parent 722f995 commit 20388ea
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
11 changes: 11 additions & 0 deletions client/metoken.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,17 @@ func (c Client) QueryMetokenIndexes(denom string) (*metoken.QueryIndexesResponse
return c.MetokenQClient().Indexes(ctx, msg)
}

func (c Client) QueryMetokenIndexPrices(denom string) (*metoken.QueryIndexPricesResponse, error) {
ctx, cancel := c.NewQCtx()
defer cancel()

msg := &metoken.QueryIndexPrices{MetokenDenom: denom}
if err := sdkutil.ValidateProtoMsg(msg); err != nil {
return nil, err
}
return c.MetokenQClient().IndexPrices(ctx, msg)
}

//
// Tx
//
2 changes: 1 addition & 1 deletion tests/e2e/e2e_metoken_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ func (s *E2ETest) getPrices(denom string) []metoken.IndexPrices {
var prices []metoken.IndexPrices
s.Require().Eventually(
func() bool {
resp, err := s.QueryMetokenPrices(denom)
resp, err := s.Umee.QueryMetokenIndexPrices(denom)
if err != nil {
return false
}
Expand Down

0 comments on commit 20388ea

Please sign in to comment.