Skip to content

Commit

Permalink
Fix retrieve FeeCurrency balance
Browse files Browse the repository at this point in the history
  • Loading branch information
gastonponti committed Nov 26, 2024
1 parent 897939b commit d47ff53
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion core/txpool/validation.go
Original file line number Diff line number Diff line change
Expand Up @@ -275,10 +275,13 @@ func ValidateTransactionWithState(tx *types.Transaction, signer types.Signer, op
}
// Ensure the transactor has enough funds to cover the transaction costs
var (
feeCurrencyBalance = opts.ExistingBalance(from, tx.FeeCurrency())
feeCurrencyBalance = common.Big0
nativeBalance = opts.ExistingBalance(from, &common.ZeroAddress)
feeCurrencyCost, nativeCost = tx.Cost()
)
if tx.FeeCurrency() != nil {
feeCurrencyBalance = opts.ExistingBalance(from, tx.FeeCurrency())
}
if feeCurrencyBalance == nil {
return fmt.Errorf("feeCurrencyBalance is nil for FeeCurrency %x", tx.FeeCurrency())
}
Expand Down

0 comments on commit d47ff53

Please sign in to comment.