From 1b0d8029417a86583603911229675a84fbbf343a Mon Sep 17 00:00:00 2001 From: Lex Berezhny Date: Mon, 23 Sep 2019 13:43:29 -0400 Subject: [PATCH] is_change bug fix --- torba/tests/client_tests/integration/test_transactions.py | 2 +- torba/torba/client/basedatabase.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/torba/tests/client_tests/integration/test_transactions.py b/torba/tests/client_tests/integration/test_transactions.py index 0e1b4b898..e574941eb 100644 --- a/torba/tests/client_tests/integration/test_transactions.py +++ b/torba/tests/client_tests/integration/test_transactions.py @@ -88,7 +88,7 @@ class BasicTransactionTests(IntegrationTestCase): await self.assertBalance(account1, '0.0') await self.assertBalance(account2, '0.0') - addresses = await self.account.receiving.get_addresses() + addresses = await account1.receiving.get_addresses() txids = await asyncio.gather(*( self.blockchain.send_to_address(address, 1.1) for address in addresses[:5] )) diff --git a/torba/torba/client/basedatabase.py b/torba/torba/client/basedatabase.py index d01115f0e..bb43150eb 100644 --- a/torba/torba/client/basedatabase.py +++ b/torba/torba/client/basedatabase.py @@ -558,7 +558,7 @@ class BaseDatabase(SQLiteMixin): account_match = set(row_accounts) & my_accounts if account_match: txo.is_my_account = True - txo.is_change = row_accounts[account_match.pop()] == 1 + txo.is_change = row_accounts[account_match.pop()] == '1' else: txo.is_change = txo.is_my_account = False txos.append(txo)