Skip to content

Commit

Permalink
Fix feePayer is not set in simulation requests
Browse files Browse the repository at this point in the history
  • Loading branch information
askolesov authored and Eengineer1 committed Aug 26, 2022
1 parent fa83a76 commit a46730b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions client/tx/factory.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ type Factory struct {
gasPrices sdk.DecCoins
signMode signing.SignMode
simulateAndExecute bool
feePayer sdk.AccAddress
feeGranter sdk.AccAddress
}

// NewFactoryCLI creates a new Factory.
Expand Down Expand Up @@ -63,6 +65,8 @@ func NewFactoryCLI(clientCtx client.Context, flagSet *pflag.FlagSet) Factory {
accountRetriever: clientCtx.AccountRetriever,
keybase: clientCtx.Keyring,
chainID: clientCtx.ChainID,
feePayer: clientCtx.FeePayer,
feeGranter: clientCtx.FeeGranter,
gas: gasSetting.Gas,
simulateAndExecute: gasSetting.Simulate,
accountNumber: accNum,
Expand Down Expand Up @@ -234,6 +238,8 @@ func (f Factory) BuildUnsignedTx(msgs ...sdk.Msg) (client.TxBuilder, error) {
tx.SetFeeAmount(fees)
tx.SetGasLimit(f.gas)
tx.SetTimeoutHeight(f.TimeoutHeight())
tx.SetFeePayer(f.feePayer)
tx.SetFeeGranter(f.feeGranter)

return tx, nil
}
Expand Down

0 comments on commit a46730b

Please sign in to comment.