Skip to content

Commit

Permalink
Execute parse history task only if senders and recipients are not empty
Browse files Browse the repository at this point in the history
  • Loading branch information
joemarct committed Sep 1, 2021
1 parent 82f9fd3 commit 2cb9204
Showing 1 changed file with 16 additions and 14 deletions.
30 changes: 16 additions & 14 deletions main/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -975,18 +975,20 @@ def transaction_post_save_task(self, address, txid, blockheight_id=None):
# Call task to parse wallet history
for wallet_handle in set(wallets):
if wallet_handle.split('|')[0] == 'slp':
parse_wallet_history.delay(
txid,
wallet_handle,
tx_fee,
senders['slp'],
recipients['slp']
)
if senders['slp'] and recipients['slp']:
parse_wallet_history.delay(
txid,
wallet_handle,
tx_fee,
senders['slp'],
recipients['slp']
)
if wallet_handle.split('|')[0] == 'bch':
parse_wallet_history.delay(
txid,
wallet_handle,
tx_fee,
senders['bch'],
recipients['bch']
)
if senders['bch'] and recipients['bch']:
parse_wallet_history.delay(
txid,
wallet_handle,
tx_fee,
senders['bch'],
recipients['bch']
)

0 comments on commit 2cb9204

Please sign in to comment.