Merge remote-tracking branch 'origin/fix_1344'

This commit is contained in:
Jack Robison 2018-08-07 19:26:15 -04:00
commit 65a02190dc
No known key found for this signature in database
GPG key ID: DF25C68FE0239BB2
2 changed files with 6 additions and 0 deletions

View file

@ -13,6 +13,7 @@ at anytime.
* *
### Fixed ### Fixed
* check `claim_address` and `change_address` earlier on publishing, to avoid hard to understand errors later in the process
* loggly error reporting not following `share_usage_data` * loggly error reporting not following `share_usage_data`
* improper error handling when data is not valid JSON * improper error handling when data is not valid JSON
* edge cases of http mirrored download of blobs * edge cases of http mirrored download of blobs

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)