wallet_balance --include-unconfirmed works now

This commit is contained in:
Lex Berezhny 2018-07-15 18:45:44 -04:00 committed by Jack Robison
parent 6f1d2e7690
commit 17aee92dc9
No known key found for this signature in database
GPG key ID: DF25C68FE0239BB2

View file

@ -1023,10 +1023,10 @@ class Daemon(AuthJSONRPCServer):
Returns: Returns:
(float) amount of lbry credits in wallet (float) amount of lbry credits in wallet
""" """
if address is None: assert address is None, "Limiting by address needs to be re-implemented in new wallet."
return self.wallet.default_account.get_balance() return self.wallet.default_account.get_balance(
else: 0 if include_unconfirmed else 6
return self.wallet.get_address_balance(address, include_unconfirmed) )
@requires(WALLET_COMPONENT) @requires(WALLET_COMPONENT)
@defer.inlineCallbacks @defer.inlineCallbacks