Skip to content

Commit

Permalink
fix: Use the provider IR instead of creating a new one (#1346)
Browse files Browse the repository at this point in the history
  • Loading branch information
vitsalis committed Dec 4, 2023
1 parent 7efcd30 commit c6e5bdb
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions relayer/chains/cosmos/log.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import (
"reflect"

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

// Extract fees and fee_payer if present
ir := types.NewInterfaceRegistry()
cdc := codec.NewProtoCodec(ir)
cdc := codec.NewProtoCodec(cc.Cdc.InterfaceRegistry)

var m sdk.Msg
if err := ir.UnpackAny(res.Tx, &m); err == nil {
if err := cc.Cdc.InterfaceRegistry.UnpackAny(res.Tx, &m); err == nil {
if tx, ok := m.(*typestx.Tx); ok {
fields = append(fields, zap.Stringer("fees", tx.GetFee()))
if feePayer := getFeePayer(cc.log, cdc, tx); feePayer != "" {
Expand Down

0 comments on commit c6e5bdb

Please sign in to comment.