Skip to content

Commit c6e5bdb

Browse files
authored
fix: Use the provider IR instead of creating a new one (#1346)
1 parent 7efcd30 commit c6e5bdb

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

relayer/chains/cosmos/log.go

+2-4
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import (
55
"reflect"
66

77
"github.com/cosmos/cosmos-sdk/codec"
8-
"github.com/cosmos/cosmos-sdk/codec/types"
98
sdk "github.com/cosmos/cosmos-sdk/types"
109
typestx "github.com/cosmos/cosmos-sdk/types/tx"
1110
feetypes "github.com/cosmos/ibc-go/v8/modules/apps/29-fee/types"
@@ -102,11 +101,10 @@ func (cc *CosmosProvider) LogSuccessTx(res *sdk.TxResponse, msgs []provider.Rela
102101
fields = append(fields, zap.Int64("gas_used", res.GasUsed))
103102

104103
// Extract fees and fee_payer if present
105-
ir := types.NewInterfaceRegistry()
106-
cdc := codec.NewProtoCodec(ir)
104+
cdc := codec.NewProtoCodec(cc.Cdc.InterfaceRegistry)
107105

108106
var m sdk.Msg
109-
if err := ir.UnpackAny(res.Tx, &m); err == nil {
107+
if err := cc.Cdc.InterfaceRegistry.UnpackAny(res.Tx, &m); err == nil {
110108
if tx, ok := m.(*typestx.Tx); ok {
111109
fields = append(fields, zap.Stringer("fees", tx.GetFee()))
112110
if feePayer := getFeePayer(cc.log, cdc, tx); feePayer != "" {

0 commit comments

Comments
 (0)