Show height on legacy REST endpoints (#7997)
* Fix showing height in rest endpoints * Fix query height * Manually inject req.Height * Small tweaks * Use withHeight Co-authored-by: Aleksandr Bezobchuk <alexanderbez@users.noreply.github.com> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
This commit is contained in:
co-authored by
Aleksandr Bezobchuk
mergify[bot]
parent
251a27d104
commit
74435137e9
+1
-2
@@ -11,7 +11,6 @@ import (
|
||||
|
||||
"github.com/cosmos/cosmos-sdk/client"
|
||||
"github.com/cosmos/cosmos-sdk/client/flags"
|
||||
"github.com/cosmos/cosmos-sdk/codec/legacy"
|
||||
"github.com/cosmos/cosmos-sdk/types/rest"
|
||||
)
|
||||
|
||||
@@ -68,7 +67,7 @@ func getBlock(clientCtx client.Context, height *int64) ([]byte, error) {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return legacy.Cdc.MarshalJSON(res)
|
||||
return clientCtx.LegacyAmino.MarshalJSON(res)
|
||||
}
|
||||
|
||||
// get the current blockchain height
|
||||
|
||||
Reference in New Issue
Block a user