Skip to content

Commit

Permalink
fix: low price error on provided value
Browse files Browse the repository at this point in the history
  • Loading branch information
istae committed Nov 7, 2022
1 parent 000e59f commit f03e6d1
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions pkg/transaction/transaction.go
Expand Up @@ -291,11 +291,10 @@ func (t *transactionService) prepareTransaction(ctx context.Context, request *Tx
if err != nil {
return nil, err
}
}
gasPrice = new(big.Int).Div(new(big.Int).Mul(big.NewInt(int64(tipPercent)+100), gasPrice), big.NewInt(100))
if gasPrice.Cmp(minGasPrice) < 0 {
} else if gasPrice.Cmp(minGasPrice) < 0 {
return nil, ErrGasPriceTooLow
}
gasPrice = new(big.Int).Div(new(big.Int).Mul(big.NewInt(int64(tipPercent)+100), gasPrice), big.NewInt(100))

return types.NewTx(&types.DynamicFeeTx{
Nonce: nonce,
Expand Down

0 comments on commit f03e6d1

Please sign in to comment.