Skip to content

Commit

Permalink
fix all query response to be binded with heightg
Browse files Browse the repository at this point in the history
  • Loading branch information
Yun committed Oct 24, 2019
1 parent 2f75b51 commit e41db14
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 17 deletions.
6 changes: 3 additions & 3 deletions x/market/client/rest/query.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ func querySwapHandlerFn(cliCtx context.CLIContext) http.HandlerFunc {
return
}

cliCtx.WithHeight(height)
cliCtx = cliCtx.WithHeight(height)
rest.PostProcessResponse(w, cliCtx, res)
}
}
Expand All @@ -76,7 +76,7 @@ func queryTerraPoolDeltaHandlerFn(cliCtx context.CLIContext) http.HandlerFunc {
return
}

cliCtx.WithHeight(height)
cliCtx = cliCtx.WithHeight(height)
rest.PostProcessResponse(w, cliCtx, res)
}
}
Expand All @@ -94,7 +94,7 @@ func queryParamsHandlerFn(cliCtx context.CLIContext) http.HandlerFunc {
return
}

cliCtx.WithHeight(height)
cliCtx = cliCtx.WithHeight(height)
rest.PostProcessResponse(w, cliCtx, res)
}
}
12 changes: 6 additions & 6 deletions x/oracle/client/rest/query.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ func queryVotesHandlerFunction(cliCtx context.CLIContext) http.HandlerFunc {
return
}

cliCtx.WithHeight(height)
cliCtx = cliCtx.WithHeight(height)
rest.PostProcessResponse(w, cliCtx, res)
}
}
Expand Down Expand Up @@ -101,7 +101,7 @@ func queryPrevotesHandlerFunction(cliCtx context.CLIContext) http.HandlerFunc {
return
}

cliCtx.WithHeight(height)
cliCtx = cliCtx.WithHeight(height)
rest.PostProcessResponse(w, cliCtx, res)
}
}
Expand Down Expand Up @@ -129,7 +129,7 @@ func queryPriceHandlerFunction(cliCtx context.CLIContext) http.HandlerFunc {
return
}

cliCtx.WithHeight(height)
cliCtx = cliCtx.WithHeight(height)
rest.PostProcessResponse(w, cliCtx, res)
}
}
Expand All @@ -147,7 +147,7 @@ func queryActivesHandlerFunction(cliCtx context.CLIContext) http.HandlerFunc {
return
}

cliCtx.WithHeight(height)
cliCtx = cliCtx.WithHeight(height)
rest.PostProcessResponse(w, cliCtx, res)
}
}
Expand All @@ -165,7 +165,7 @@ func queryParamsHandlerFn(cliCtx context.CLIContext) http.HandlerFunc {
return
}

cliCtx.WithHeight(height)
cliCtx = cliCtx.WithHeight(height)
rest.PostProcessResponse(w, cliCtx, res)
}
}
Expand Down Expand Up @@ -199,7 +199,7 @@ func queryFeederDelegationHandlerFn(cliCtx context.CLIContext) http.HandlerFunc
return
}

cliCtx.WithHeight(height)
cliCtx = cliCtx.WithHeight(height)
rest.PostProcessResponse(w, cliCtx, res)
}
}
16 changes: 8 additions & 8 deletions x/treasury/client/rest/query.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ func queryTaxRateHandlerFunction(cliCtx context.CLIContext) http.HandlerFunc {
return
}

cliCtx.WithHeight(height)
cliCtx = cliCtx.WithHeight(height)
rest.PostProcessResponse(w, cliCtx, res)
}
}
Expand All @@ -90,7 +90,7 @@ func queryTaxCapHandlerFunction(cliCtx context.CLIContext) http.HandlerFunc {
return
}

cliCtx.WithHeight(height)
cliCtx = cliCtx.WithHeight(height)
rest.PostProcessResponse(w, cliCtx, res)
}
}
Expand Down Expand Up @@ -132,7 +132,7 @@ func queryRewardWeightHandlerFunction(cliCtx context.CLIContext) http.HandlerFun
return
}

cliCtx.WithHeight(height)
cliCtx = cliCtx.WithHeight(height)
rest.PostProcessResponse(w, cliCtx, res)
}
}
Expand Down Expand Up @@ -174,7 +174,7 @@ func queryHistoricalIssuanceHandlerFunction(cliCtx context.CLIContext) http.Hand
return
}

cliCtx.WithHeight(height)
cliCtx = cliCtx.WithHeight(height)
rest.PostProcessResponse(w, cliCtx, res)
}
}
Expand Down Expand Up @@ -217,7 +217,7 @@ func queryTaxProceedsHandlerFunction(cliCtx context.CLIContext) http.HandlerFunc
return
}

cliCtx.WithHeight(height)
cliCtx = cliCtx.WithHeight(height)
rest.PostProcessResponse(w, cliCtx, res)
}
}
Expand Down Expand Up @@ -255,7 +255,7 @@ func querySeigniorageProceedsHandlerFunction(cliCtx context.CLIContext) http.Han
return
}

cliCtx.WithHeight(height)
cliCtx = cliCtx.WithHeight(height)
rest.PostProcessResponse(w, cliCtx, res)
}
}
Expand All @@ -273,7 +273,7 @@ func queryCurrentEpochHandlerFunction(cliCtx context.CLIContext) http.HandlerFun
return
}

cliCtx.WithHeight(height)
cliCtx = cliCtx.WithHeight(height)
rest.PostProcessResponse(w, cliCtx, res)
}
}
Expand All @@ -291,7 +291,7 @@ func queryParametersHandlerFn(cliCtx context.CLIContext) http.HandlerFunc {
return
}

cliCtx.WithHeight(height)
cliCtx = cliCtx.WithHeight(height)
rest.PostProcessResponse(w, cliCtx, res)
}
}

0 comments on commit e41db14

Please sign in to comment.