only call get_max_usable_balance_for_claim in Wallet.py if the bid looks too high for the balance
This commit is contained in:
parent
25eb64b346
commit
e94d10d3eb
1 changed files with 4 additions and 3 deletions
|
@ -555,9 +555,10 @@ class Wallet(object):
|
|||
decoded = ClaimDict.load_dict(metadata)
|
||||
serialized = decoded.serialized
|
||||
|
||||
amt = yield self.get_max_usable_balance_for_claim(name)
|
||||
if bid > amt:
|
||||
raise InsufficientFundsError()
|
||||
if self.get_balance() <= bid:
|
||||
amt = yield self.get_max_usable_balance_for_claim(name)
|
||||
if bid > amt:
|
||||
raise InsufficientFundsError()
|
||||
|
||||
claim = yield self._send_name_claim(name, serialized.encode('hex'),
|
||||
bid, certificate_id, claim_address, change_address)
|
||||
|
|
Loading…
Reference in a new issue