From e41db14eac5a7c8691eeaef3e1f3ed45840c10c3 Mon Sep 17 00:00:00 2001 From: Yun Date: Thu, 24 Oct 2019 12:12:08 +0900 Subject: [PATCH] fix all query response to be binded with heightg --- x/market/client/rest/query.go | 6 +++--- x/oracle/client/rest/query.go | 12 ++++++------ x/treasury/client/rest/query.go | 16 ++++++++-------- 3 files changed, 17 insertions(+), 17 deletions(-) diff --git a/x/market/client/rest/query.go b/x/market/client/rest/query.go index b46b3eb26..7669c62fe 100644 --- a/x/market/client/rest/query.go +++ b/x/market/client/rest/query.go @@ -58,7 +58,7 @@ func querySwapHandlerFn(cliCtx context.CLIContext) http.HandlerFunc { return } - cliCtx.WithHeight(height) + cliCtx = cliCtx.WithHeight(height) rest.PostProcessResponse(w, cliCtx, res) } } @@ -76,7 +76,7 @@ func queryTerraPoolDeltaHandlerFn(cliCtx context.CLIContext) http.HandlerFunc { return } - cliCtx.WithHeight(height) + cliCtx = cliCtx.WithHeight(height) rest.PostProcessResponse(w, cliCtx, res) } } @@ -94,7 +94,7 @@ func queryParamsHandlerFn(cliCtx context.CLIContext) http.HandlerFunc { return } - cliCtx.WithHeight(height) + cliCtx = cliCtx.WithHeight(height) rest.PostProcessResponse(w, cliCtx, res) } } diff --git a/x/oracle/client/rest/query.go b/x/oracle/client/rest/query.go index 70a3f5feb..804647819 100644 --- a/x/oracle/client/rest/query.go +++ b/x/oracle/client/rest/query.go @@ -59,7 +59,7 @@ func queryVotesHandlerFunction(cliCtx context.CLIContext) http.HandlerFunc { return } - cliCtx.WithHeight(height) + cliCtx = cliCtx.WithHeight(height) rest.PostProcessResponse(w, cliCtx, res) } } @@ -101,7 +101,7 @@ func queryPrevotesHandlerFunction(cliCtx context.CLIContext) http.HandlerFunc { return } - cliCtx.WithHeight(height) + cliCtx = cliCtx.WithHeight(height) rest.PostProcessResponse(w, cliCtx, res) } } @@ -129,7 +129,7 @@ func queryPriceHandlerFunction(cliCtx context.CLIContext) http.HandlerFunc { return } - cliCtx.WithHeight(height) + cliCtx = cliCtx.WithHeight(height) rest.PostProcessResponse(w, cliCtx, res) } } @@ -147,7 +147,7 @@ func queryActivesHandlerFunction(cliCtx context.CLIContext) http.HandlerFunc { return } - cliCtx.WithHeight(height) + cliCtx = cliCtx.WithHeight(height) rest.PostProcessResponse(w, cliCtx, res) } } @@ -165,7 +165,7 @@ func queryParamsHandlerFn(cliCtx context.CLIContext) http.HandlerFunc { return } - cliCtx.WithHeight(height) + cliCtx = cliCtx.WithHeight(height) rest.PostProcessResponse(w, cliCtx, res) } } @@ -199,7 +199,7 @@ func queryFeederDelegationHandlerFn(cliCtx context.CLIContext) http.HandlerFunc return } - cliCtx.WithHeight(height) + cliCtx = cliCtx.WithHeight(height) rest.PostProcessResponse(w, cliCtx, res) } } diff --git a/x/treasury/client/rest/query.go b/x/treasury/client/rest/query.go index e9c3fd4c5..c27561ccd 100644 --- a/x/treasury/client/rest/query.go +++ b/x/treasury/client/rest/query.go @@ -66,7 +66,7 @@ func queryTaxRateHandlerFunction(cliCtx context.CLIContext) http.HandlerFunc { return } - cliCtx.WithHeight(height) + cliCtx = cliCtx.WithHeight(height) rest.PostProcessResponse(w, cliCtx, res) } } @@ -90,7 +90,7 @@ func queryTaxCapHandlerFunction(cliCtx context.CLIContext) http.HandlerFunc { return } - cliCtx.WithHeight(height) + cliCtx = cliCtx.WithHeight(height) rest.PostProcessResponse(w, cliCtx, res) } } @@ -132,7 +132,7 @@ func queryRewardWeightHandlerFunction(cliCtx context.CLIContext) http.HandlerFun return } - cliCtx.WithHeight(height) + cliCtx = cliCtx.WithHeight(height) rest.PostProcessResponse(w, cliCtx, res) } } @@ -174,7 +174,7 @@ func queryHistoricalIssuanceHandlerFunction(cliCtx context.CLIContext) http.Hand return } - cliCtx.WithHeight(height) + cliCtx = cliCtx.WithHeight(height) rest.PostProcessResponse(w, cliCtx, res) } } @@ -217,7 +217,7 @@ func queryTaxProceedsHandlerFunction(cliCtx context.CLIContext) http.HandlerFunc return } - cliCtx.WithHeight(height) + cliCtx = cliCtx.WithHeight(height) rest.PostProcessResponse(w, cliCtx, res) } } @@ -255,7 +255,7 @@ func querySeigniorageProceedsHandlerFunction(cliCtx context.CLIContext) http.Han return } - cliCtx.WithHeight(height) + cliCtx = cliCtx.WithHeight(height) rest.PostProcessResponse(w, cliCtx, res) } } @@ -273,7 +273,7 @@ func queryCurrentEpochHandlerFunction(cliCtx context.CLIContext) http.HandlerFun return } - cliCtx.WithHeight(height) + cliCtx = cliCtx.WithHeight(height) rest.PostProcessResponse(w, cliCtx, res) } } @@ -291,7 +291,7 @@ func queryParametersHandlerFn(cliCtx context.CLIContext) http.HandlerFunc { return } - cliCtx.WithHeight(height) + cliCtx = cliCtx.WithHeight(height) rest.PostProcessResponse(w, cliCtx, res) } }