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)
|
decoded = ClaimDict.load_dict(metadata)
|
||||||
serialized = decoded.serialized
|
serialized = decoded.serialized
|
||||||
|
|
||||||
amt = yield self.get_max_usable_balance_for_claim(name)
|
if self.get_balance() <= bid:
|
||||||
if bid > amt:
|
amt = yield self.get_max_usable_balance_for_claim(name)
|
||||||
raise InsufficientFundsError()
|
if bid > amt:
|
||||||
|
raise InsufficientFundsError()
|
||||||
|
|
||||||
claim = yield self._send_name_claim(name, serialized.encode('hex'),
|
claim = yield self._send_name_claim(name, serialized.encode('hex'),
|
||||||
bid, certificate_id, claim_address, change_address)
|
bid, certificate_id, claim_address, change_address)
|
||||||
|
|
Loading…
Add table
Reference in a new issue