Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
  • Loading branch information
mmsqe committed Sep 11, 2023
1 parent 30003c0 commit 409de02
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions relayer/chains/cosmos/tx.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ import (
sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
txtypes "github.com/cosmos/cosmos-sdk/types/tx"
"github.com/cosmos/cosmos-sdk/types/tx/signing"
authsigning "github.com/cosmos/cosmos-sdk/x/auth/signing"
authtx "github.com/cosmos/cosmos-sdk/x/auth/tx"
"github.com/cosmos/gogoproto/proto"
feetypes "github.com/cosmos/ibc-go/v7/modules/apps/29-fee/types"
Expand Down Expand Up @@ -700,13 +699,6 @@ func convertCoins(prices string) (sdk.Coins, error) {
return coins, nil
}

func (cc *CosmosProvider) encodeSignedTx(
ctx context.Context,
tx authsigning.Tx,
) ([]byte, error) {
return cc.Cdc.TxConfig.TxEncoder()(tx)
}

func (cc *CosmosProvider) buildMessages(
ctx context.Context,
txf *tx.Factory,
Expand All @@ -717,7 +709,7 @@ func (cc *CosmosProvider) buildMessages(
return nil, 0, sdk.Coins{}, err
}
tx := txb.GetTx()
txBytes, err := cc.encodeSignedTx(ctx, tx)
txBytes, err := cc.Cdc.TxConfig.TxEncoder()(tx)
if err != nil {
return nil, 0, sdk.Coins{}, err
}
Expand Down Expand Up @@ -907,7 +899,7 @@ func (cc *CosmosProvider) buildEvmMessages(
builder.SetMsgs(txs...)
builder.SetFeeAmount(fees)
builder.SetGasLimit(txGasLimit)
txBytes, err := cc.encodeSignedTx(ctx, builder.GetTx())
txBytes, err := cc.Cdc.TxConfig.TxEncoder()(builder.GetTx())
if err != nil {
return nil, 0, sdk.Coins{}, err
}
Expand Down

0 comments on commit 409de02

Please sign in to comment.