Add explicit min/max amounts on mining fee rate error

This commit is contained in:
Reckless_Satoshi 2022-06-27 07:22:10 -07:00
parent 131fa0fb99
commit 2f5bb6e9ae
No known key found for this signature in database
GPG Key ID: 9C4585B561315571

View File

@ -662,15 +662,15 @@ class Logics:
if mining_fee_rate:
# not a valid mining fee
if float(mining_fee_rate) <= 1:
if float(mining_fee_rate) < 1:
return False, {
"bad_address":
"The mining fee is too low."
"The mining fee is too low, must be higher than 1 Sat/vbyte"
}
elif float(mining_fee_rate) > 50:
return False, {
"bad_address":
"The mining fee is too high."
"The mining fee is too high, must be less than 50 Sats/vbyte"
}
order.payout_tx.mining_fee_rate = float(mining_fee_rate)
# If not mining ee provider use backend's suggested fee rate