only call get_max_usable_balance when the bid might be too high
This commit is contained in:
parent
69ecc6ce90
commit
9b44ba7c84
1 changed files with 12 additions and 10 deletions
|
@ -2037,6 +2037,8 @@ class Daemon(AuthJSONRPCServer):
|
|||
if bid <= 0.0:
|
||||
raise ValueError("Bid value must be greater than 0.0")
|
||||
|
||||
yield self.session.wallet.update_balance()
|
||||
if bid >= self.session.wallet.get_balance():
|
||||
balance = yield self.session.wallet.get_max_usable_balance_for_claim(name)
|
||||
max_bid_amount = balance - MAX_UPDATE_FEE_ESTIMATE
|
||||
if balance <= MAX_UPDATE_FEE_ESTIMATE:
|
||||
|
|
Loading…
Add table
Reference in a new issue