Skip to content

Commit

Permalink
Fix user bank indexing (#6789)
Browse files Browse the repository at this point in the history
  • Loading branch information
raymondjacobson authored Nov 27, 2023
1 parent 8448c37 commit 9624aaa
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions packages/discovery-provider/src/tasks/index_user_bank.py
Original file line number Diff line number Diff line change
Expand Up @@ -605,8 +605,13 @@ def process_transfer_instruction(
# not the claimable tokens program, so we will always have a sender_user_id
if receiver_user_id is None:
receiver_account_pubkey = Pubkey.from_string(receiver_account)
receiver_account_info = solana_client_manager.get_account_info_json_parsed(receiver_account_pubkey)
receiver_account_owner = receiver_account_info.data.parsed["info"]["owner"]
receiver_account_info = solana_client_manager.get_account_info_json_parsed(
receiver_account_pubkey
)
if receiver_account_info:
receiver_account_owner = receiver_account_info.data.parsed["info"]["owner"]
else:
receiver_account_owner = receiver_account
TransactionHistoryModel = (
AudioTransactionsHistory if is_audio else USDCTransactionsHistory
)
Expand Down

0 comments on commit 9624aaa

Please sign in to comment.