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:
Jack Robison 2018-03-14 13:47:34 -04:00
parent 25eb64b346
commit e94d10d3eb
No known key found for this signature in database
GPG key ID: DF25C68FE0239BB2

View file

@ -555,6 +555,7 @@ class Wallet(object):
decoded = ClaimDict.load_dict(metadata)
serialized = decoded.serialized
if self.get_balance() <= bid:
amt = yield self.get_max_usable_balance_for_claim(name)
if bid > amt:
raise InsufficientFundsError()