@@ -2057,7 +2057,7 @@ def scan(self, scan_gap_limit=5, account_id=None, change=None, rescan_used=False
20572057 # Rescan used addresses
20582058 if rescan_used :
20592059 for key in self .keys_addresses (account_id = account_id , change = change , network = network , used = True ):
2060- self .scan_key (key .id )
2060+ self .scan_key (key .key_id )
20612061
20622062 # Update already known transactions with known block height
20632063 self .transactions_update_confirmations ()
@@ -3449,12 +3449,17 @@ def utxo_last(self, address):
34493449
34503450 :return str:
34513451 """
3452- to = self .session .query (
3453- DbTransaction .txid , DbTransaction .confirmations ). \
3454- join (DbTransactionOutput ).join (DbKey ). \
3455- filter (DbKey .address == address , DbTransaction .wallet_id == self .wallet_id ,
3456- DbTransactionOutput .spent .is_ (False )). \
3457- order_by (DbTransaction .confirmations ).first ()
3452+ query = self .session .query (
3453+ DbTransaction .txid , DbTransaction .confirmations
3454+ ).join (DbTransactionOutput ).join (DbKey ).filter (
3455+ DbKey .address == address ,
3456+ DbTransaction .wallet_id == self .wallet_id ,
3457+ DbTransactionOutput .spent .is_ (False )
3458+ )
3459+ if self .ignore_dust :
3460+ query = query .filter (DbTransactionOutput .value >= self .network .dust_amount )
3461+
3462+ to = query .order_by (DbTransaction .confirmations ).first ()
34583463 return '' if not to else to [0 ].hex ()
34593464
34603465 def transactions_update_confirmations (self ):
@@ -3766,7 +3771,7 @@ def transactions_export(self, account_id=None, network=None, include_new=False,
37663771
37673772 # Loop through all transaction inputs and outputs
37683773 for tei in te :
3769- # Create string with list of inputs addresses for incoming transactions, and outputs addresses
3774+ # Create string with a list of inputs addresses for incoming transactions, and outputs addresses
37703775 # for outgoing txs
37713776 addr_list_in = tei [3 ] if isinstance (tei [3 ], list ) else [tei [3 ]]
37723777 addr_list_out = tei [4 ] if isinstance (tei [4 ], list ) else [tei [4 ]]
0 commit comments