tells that an address is wrong earlier on publishing

This commit is contained in:
Victor Shyba 2018-08-07 13:52:01 -03:00
parent 9511040d5a
commit 382226ff9a

View file

@ -1734,6 +1734,11 @@ class Daemon(AuthJSONRPCServer):
if bid <= 0.0: if bid <= 0.0:
raise ValueError("Bid value must be greater than 0.0") raise ValueError("Bid value must be greater than 0.0")
for address in [claim_address, change_address]:
if address is not None:
# raises an error if the address is invalid
decode_address(address)
yield self.wallet.update_balance() yield self.wallet.update_balance()
if bid >= self.wallet.get_balance(): if bid >= self.wallet.get_balance():
balance = yield self.wallet.get_max_usable_balance_for_claim(name) balance = yield self.wallet.get_max_usable_balance_for_claim(name)