From dc5a0c056d8fdb3ae7e03623d458da884d283dad Mon Sep 17 00:00:00 2001 From: Adam Wozniak <29418299+adamewozniak@users.noreply.github.com> Date: Tue, 5 Jul 2022 10:30:01 -0700 Subject: [PATCH] chore: price-feeder ctx cleanup (#1098) Removes an unnecessary additional context from the price-feeder height subscription logic as mentioned [here](https://github.com/umee-network/umee/pull/1084#discussion_r912236907) --- ### Author Checklist _All items are required. Please add a note to the item if the item is not applicable and please add links to any relevant follow up issues._ I have... - [ ] included the correct [type prefix](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json) in the PR title - [ ] added `!` to the type prefix if API or client breaking change - [ ] added appropriate labels to the PR - [ ] targeted the correct branch (see [PR Targeting](https://github.com/umee-network/umee/blob/main/CONTRIBUTING.md#pr-targeting)) - [ ] provided a link to the relevant issue or specification - [ ] added a changelog entry to `CHANGELOG.md` - [ ] included comments for [documenting Go code](https://blog.golang.org/godoc) - [ ] updated the relevant documentation or specification - [ ] reviewed "Files changed" and left comments if necessary - [ ] confirmed all CI checks have passed ### Reviewers Checklist _All items are required. Please add a note if the item is not applicable and please add your handle next to the items reviewed if you only reviewed selected items._ I have... - [ ] confirmed the correct [type prefix](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json) in the PR title - [ ] confirmed all author checklist items have been addressed - [ ] reviewed state machine logic - [ ] reviewed API design and naming - [ ] reviewed documentation is accurate - [ ] reviewed tests and test coverage - [ ] manually tested (if applicable) --- price-feeder/cmd/price-feeder.go | 1 + price-feeder/oracle/client/client.go | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/price-feeder/cmd/price-feeder.go b/price-feeder/cmd/price-feeder.go index 96ad7309d1..18f42336b3 100644 --- a/price-feeder/cmd/price-feeder.go +++ b/price-feeder/cmd/price-feeder.go @@ -119,6 +119,7 @@ func priceFeederCmdHandler(cmd *cobra.Command, args []string) error { } oracleClient, err := client.NewOracleClient( + ctx, logger, cfg.Account.ChainID, cfg.Keyring.Backend, diff --git a/price-feeder/oracle/client/client.go b/price-feeder/oracle/client/client.go index 3f687f15aa..dcae808992 100644 --- a/price-feeder/oracle/client/client.go +++ b/price-feeder/oracle/client/client.go @@ -54,6 +54,7 @@ type ( ) func NewOracleClient( + ctx context.Context, logger zerolog.Logger, chainID string, keyringBackend string, @@ -99,7 +100,7 @@ func NewOracleClient( } chainHeight, err := NewChainHeight( - context.Background(), + ctx, clientCtx.Client, oracleClient.Logger, blockHeight,