include_is_spent no longer needed

This commit is contained in:
Lex Berezhny 2020-06-21 19:52:39 -04:00
parent 46da2584ca
commit 9198877098
4 changed files with 2 additions and 8 deletions

View file

@ -217,7 +217,6 @@ def get_transactions(**constraints) -> Tuple[List[Transaction], Optional[int]]:
def _get_transactions(wallet=None, include_total=False, **constraints) -> Tuple[List[Transaction], Optional[int]]:
include_is_spent = constraints.pop('include_is_spent', False)
include_is_my_input = constraints.pop('include_is_my_input', False)
include_is_my_output = constraints.pop('include_is_my_output', False)
@ -244,7 +243,6 @@ def _get_transactions(wallet=None, include_total=False, **constraints) -> Tuple[
get_txos(
wallet=wallet,
tx_hash__in=txids[offset:offset + MAX_QUERY_VARIABLES], order_by='txo.tx_hash',
include_is_spent=include_is_spent,
include_is_my_input=include_is_my_input,
include_is_my_output=include_is_my_output,
)[0]
@ -403,7 +401,6 @@ def rows_to_txos(rows: List[dict], include_tx=True) -> List[Output]:
def get_txos(no_tx=False, include_total=False, **constraints) -> Tuple[List[Output], Optional[int]]:
wallet_account_ids = constraints.pop('wallet_account_ids', [])
include_is_spent = constraints.get('include_is_spent', False)
include_is_my_input = constraints.get('include_is_my_input', False)
include_is_my_output = constraints.pop('include_is_my_output', False)
include_received_tips = constraints.pop('include_received_tips', False)
@ -475,7 +472,6 @@ def get_txos(no_tx=False, include_total=False, **constraints) -> Tuple[List[Outp
def _clean_txo_constraints_for_aggregation(constraints):
constraints.pop('include_is_spent', None)
constraints.pop('include_is_my_input', None)
constraints.pop('include_is_my_output', None)
constraints.pop('include_received_tips', None)

View file

@ -2701,7 +2701,6 @@ class API:
accounts = wallet.accounts.get_or_all(txo_dict.pop('account_id'))
constraints = {
'resolve': resolve,
'include_is_spent': True,
'include_is_my_input': True,
'include_is_my_output': True,
'include_received_tips': include_received_tips,

View file

@ -387,7 +387,7 @@ class UnitDBTestCase(AsyncioTestCase):
async def get_claims(self):
claims = []
sql = (
"select claim_id from claim order by height, tx_position"
"select claim_id from claim order by height"
)
for claim in await self.db.execute_fetchall(sql):
claims.append(claim['claim_id'])

View file

@ -261,8 +261,7 @@ class Wallet:
async def list_transactions(self, **constraints):
return txs_to_dict(await self.db.get_transactions(
include_is_my_output=True, include_is_spent=True,
**constraints
include_is_my_output=True, **constraints
), self.ledger)
async def create_transaction(