fix balance check when claiming a name

This commit is contained in:
Jack Robison 2017-04-12 14:47:46 -04:00
parent 10c72dcfd2
commit 2c8b99df76

View file

@ -1754,7 +1754,7 @@ class Daemon(AuthJSONRPCServer):
raise Exception("Invalid channel name") raise Exception("Invalid channel name")
if amount <= 0: if amount <= 0:
raise Exception("Invalid amount") raise Exception("Invalid amount")
if amount > self.session.wallet.wallet_balance: if amount > self.session.wallet.get_balance():
raise InsufficientFundsError() raise InsufficientFundsError()
result = yield self.session.wallet.claim_new_channel(channel_name, amount) result = yield self.session.wallet.claim_new_channel(channel_name, amount)
@ -1842,7 +1842,7 @@ class Daemon(AuthJSONRPCServer):
if bid <= 0.0: if bid <= 0.0:
raise Exception("Invalid bid") raise Exception("Invalid bid")
if bid < self.session.wallet.wallet_balance: if bid < self.session.wallet.get_balance():
raise InsufficientFundsError() raise InsufficientFundsError()
metadata = metadata or {} metadata = metadata or {}