changed lbry account.get_balance() to have same confirmations default as baseaccount.get_balance()

This commit is contained in:
Lex Berezhny 2018-10-08 14:09:37 -04:00
parent 1747c9d866
commit 3664c25d98
2 changed files with 4 additions and 4 deletions

View file

@ -115,7 +115,7 @@ class Account(BaseAccount):
indent=2
))
def get_balance(self, confirmations=6, include_claims=False, **constraints):
def get_balance(self, confirmations=0, include_claims=False, **constraints):
if not include_claims:
constraints.update({'is_claim': 0, 'is_update': 0, 'is_support': 0})
return super().get_balance(confirmations, **constraints)

View file

@ -54,7 +54,7 @@ class BasicTransactionTest(IntegrationTestCase):
self.on_transaction_id(sendtxid2),
])
self.assertEqual(d2l(await d2f(self.account.get_balance(0))), '10.0')
self.assertEqual(d2l(await d2f(self.account.get_balance())), '10.0')
cert, key = generate_certificate()
cert_tx = await d2f(Transaction.claim('@bar', cert, l2d('1.0'), address1, [self.account], self.account))
@ -74,8 +74,8 @@ class BasicTransactionTest(IntegrationTestCase):
self.on_transaction_id(cert_tx.id),
])
self.assertEqual(d2l(await d2f(self.account.get_balance(0))), '7.985786')
self.assertEqual(d2l(await d2f(self.account.get_balance(0, include_claims=True))), '9.985786')
self.assertEqual(d2l(await d2f(self.account.get_balance())), '7.985786')
self.assertEqual(d2l(await d2f(self.account.get_balance(include_claims=True))), '9.985786')
response = await d2f(self.ledger.resolve(0, 10, 'lbry://@bar/foo'))
self.assertIn('lbry://@bar/foo', response)