Skip to content

Commit

Permalink
Merge PR: fix bug of simulate (#2015)
Browse files Browse the repository at this point in the history
  • Loading branch information
yann-sjtu authored May 10, 2022
1 parent 0e5e18d commit 64113d9
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion app/ante/account.go
Original file line number Diff line number Diff line change
Expand Up @@ -209,8 +209,13 @@ func (avd AccountAnteDecorator) AnteHandle(ctx sdk.Context, tx sdk.Tx, simulate
var acc exported.Account
var getAccGasUsed sdk.Gas

address := msgEthTx.AccountAddress()
if address.Empty() && ctx.From() != "" {
msgEthTx.SetFrom(ctx.From())
address = msgEthTx.AccountAddress()
}

if !simulate {
address := msgEthTx.AccountAddress()
if address.Empty() {
panic("sender address cannot be empty")
}
Expand Down

0 comments on commit 64113d9

Please sign in to comment.