mirror of
https://github.com/RoboSats/robosats.git
synced 2025-01-05 14:00:09 +00:00
Add explicit min/max amounts on mining fee rate error
This commit is contained in:
parent
131fa0fb99
commit
2f5bb6e9ae
@ -662,15 +662,15 @@ class Logics:
|
|||||||
|
|
||||||
if mining_fee_rate:
|
if mining_fee_rate:
|
||||||
# not a valid mining fee
|
# not a valid mining fee
|
||||||
if float(mining_fee_rate) <= 1:
|
if float(mining_fee_rate) < 1:
|
||||||
return False, {
|
return False, {
|
||||||
"bad_address":
|
"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:
|
elif float(mining_fee_rate) > 50:
|
||||||
return False, {
|
return False, {
|
||||||
"bad_address":
|
"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)
|
order.payout_tx.mining_fee_rate = float(mining_fee_rate)
|
||||||
# If not mining ee provider use backend's suggested fee rate
|
# If not mining ee provider use backend's suggested fee rate
|
||||||
|
Loading…
Reference in New Issue
Block a user