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
+3 -3
View File
@@ -12,7 +12,7 @@ import (
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/cosmos/cosmos-sdk/types/rest"
"github.com/cosmos/cosmos-sdk/version"
authclient "github.com/cosmos/cosmos-sdk/x/auth/client"
authtx "github.com/cosmos/cosmos-sdk/x/auth/tx"
"github.com/cosmos/cosmos-sdk/x/auth/types"
)
@@ -189,7 +189,7 @@ $ %s query txs --%s 'message.sender=cosmos1...&message.action=withdraw_delegator
page, _ := cmd.Flags().GetInt(flags.FlagPage)
limit, _ := cmd.Flags().GetInt(flags.FlagLimit)
txs, err := authclient.QueryTxsByEvents(clientCtx, tmEvents, page, limit, "")
txs, err := authtx.QueryTxsByEvents(clientCtx, tmEvents, page, limit, "")
if err != nil {
return err
}
@@ -219,7 +219,7 @@ func QueryTxCmd() *cobra.Command {
if err != nil {
return err
}
output, err := authclient.QueryTx(clientCtx, args[0])
output, err := authtx.QueryTx(clientCtx, args[0])
if err != nil {
return err
}