Move QueryTx functions to x/auth/tx (#8734)

* Use x/auth/client for querying Txs

* Fix lint

* Fix small test

* Update todos

* Move QueryTx functions to x/auth/tx

Co-authored-by: Alessio Treglia <alessio@tendermint.com>
This commit is contained in:
Amaury
2021-03-01 15:57:28 +00:00
committed by GitHub
co-authored by Alessio Treglia
parent 5f2b90c3c7
commit a93edeef4c
9 changed files with 49 additions and 89 deletions
+2 -2
View File
@@ -9,7 +9,7 @@ import (
"github.com/cosmos/cosmos-sdk/client"
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/cosmos/cosmos-sdk/types/rest"
authclient "github.com/cosmos/cosmos-sdk/x/auth/client"
authtx "github.com/cosmos/cosmos-sdk/x/auth/tx"
"github.com/cosmos/cosmos-sdk/x/staking/types"
)
@@ -33,7 +33,7 @@ func queryTxs(clientCtx client.Context, action string, delegatorAddr string) (*s
fmt.Sprintf("%s.%s='%s'", sdk.EventTypeMessage, sdk.AttributeKeySender, delegatorAddr),
}
return authclient.QueryTxsByEvents(clientCtx, events, page, limit, "")
return authtx.QueryTxsByEvents(clientCtx, events, page, limit, "")
}
func queryBonds(clientCtx client.Context, endpoint string) http.HandlerFunc {