refactor: remove .Type() and .Route() from msgs (#14751)

This commit is contained in:
Julien Robert
2023-01-24 17:03:06 +00:00
committed by GitHub
parent bc0386e996
commit 8dbdfea9ef
48 changed files with 409 additions and 769 deletions
+1 -2
View File
@@ -13,7 +13,6 @@ import (
"github.com/cosmos/cosmos-sdk/client"
sdk "github.com/cosmos/cosmos-sdk/types"
moduletestutil "github.com/cosmos/cosmos-sdk/types/module/testutil"
"github.com/cosmos/cosmos-sdk/x/auth/migrations/legacytx"
"github.com/cosmos/cosmos-sdk/x/gov"
"github.com/cosmos/cosmos-sdk/x/gov/client/utils"
v1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1"
@@ -46,7 +45,7 @@ func (mock TxSearchMock) TxSearch(ctx context.Context, query string, prove bool,
return nil, err
}
for _, msg := range sdkTx.GetMsgs() {
if msg.(legacytx.LegacyMsg).Type() == msgType {
if sdk.MsgTypeURL(msg) == msgType {
matchingTxs = append(matchingTxs, tx)
break
}