Skip to content

Commit

Permalink
Use alias function
Browse files Browse the repository at this point in the history
  • Loading branch information
raynaudoe committed Mar 28, 2024
1 parent bca3e7c commit 8e6571b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
3 changes: 1 addition & 2 deletions codec/types/types_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import (

"github.com/cosmos/gogoproto/jsonpb"
"github.com/cosmos/gogoproto/proto"
gogoproto "github.com/cosmos/gogoproto/types/any"
testdata "github.com/cosmos/gogoproto/types/any/test"
"github.com/stretchr/testify/require"

Expand Down Expand Up @@ -189,7 +188,7 @@ func TestAny_ProtoJSON(t *testing.T) {
ha := &test.HasAnimal{
Animal: any,
}
err = ha.UnpackInterfaces(gogoproto.ProtoJSONPacker{JSONPBMarshaler: jm})
err = ha.UnpackInterfaces(types.ProtoJSONPacker{JSONPBMarshaler: jm})
require.NoError(t, err)
json, err = jm.MarshalToString(ha)
require.NoError(t, err)
Expand Down
4 changes: 1 addition & 3 deletions x/auth/migrations/legacytx/stdtx.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
package legacytx

import (
types "github.com/cosmos/gogoproto/types/any"

errorsmod "cosmossdk.io/errors"
"cosmossdk.io/math"

Expand Down Expand Up @@ -107,7 +105,7 @@ func (tx StdTx) GetMsgs() []sdk.Msg { return tx.Msgs }
// so it can't be saved into protobuf configured storage. We are using it only for API
// compatibility.
func (tx *StdTx) AsAny() *codectypes.Any {
return types.UnsafePackAnyWithCache(tx)
return codectypes.UnsafePackAny(tx)
}

// GetMemo returns the memo
Expand Down

0 comments on commit 8e6571b

Please sign in to comment.