diff --git a/ignite/pkg/cosmosclient/cosmosclient.go b/ignite/pkg/cosmosclient/cosmosclient.go index 6453656ce3..81be08b7c0 100644 --- a/ignite/pkg/cosmosclient/cosmosclient.go +++ b/ignite/pkg/cosmosclient/cosmosclient.go @@ -573,6 +573,10 @@ func (c Client) CreateTx(goCtx context.Context, account cosmosaccount.Account, m return TxService{}, err } + if c.gasAdjustment != 0 && c.gasAdjustment != defaultGasAdjustment { + txf = txf.WithGasAdjustment(c.gasAdjustment) + } + var gas uint64 if c.gas != "" && c.gas != GasAuto { gas, err = strconv.ParseUint(c.gas, 10, 64) @@ -595,10 +599,6 @@ func (c Client) CreateTx(goCtx context.Context, account cosmosaccount.Account, m txf = txf.WithGasPrices(c.gasPrices) } - if c.gasAdjustment != 0 && c.gasAdjustment != defaultGasAdjustment { - txf = txf.WithGasAdjustment(c.gasAdjustment) - } - txUnsigned, err := txf.BuildUnsignedTx(msgs...) if err != nil { return TxService{}, errors.WithStack(err)