diff --git a/prediction_market_agent/db/blockchain_transaction_fetcher.py b/prediction_market_agent/db/blockchain_transaction_fetcher.py index ee50213e..096d8fee 100644 --- a/prediction_market_agent/db/blockchain_transaction_fetcher.py +++ b/prediction_market_agent/db/blockchain_transaction_fetcher.py @@ -60,7 +60,10 @@ def fetch_unseen_transactions( # Additionally, processed tx_hashes are filtered out anyways. query = f'select * from gnosis.transactions where "to" = {Web3.to_checksum_address(consumer_address)} AND block_number >= {min_block_number} and value >= {xdai_to_wei(MicrochainAgentKeys().RECEIVER_MINIMUM_AMOUNT)} order by block_time asc' df = spice.query( - query, api_key=keys.dune_api_key.get_secret_value(), cache=False + query, + api_key=keys.dune_api_key.get_secret_value(), + cache=False, + refresh=True, ) existing_hashes = self.blockchain_table_handler.fetch_all_transaction_hashes( diff --git a/tests/agents/microchain/test_messages_functions.py b/tests/agents/microchain/test_messages_functions.py index a20eb3db..71b91d72 100644 --- a/tests/agents/microchain/test_messages_functions.py +++ b/tests/agents/microchain/test_messages_functions.py @@ -43,7 +43,9 @@ def account2_private_key() -> SecretStr: ) # anvil account 1 -def mock_spice_query(query: str, api_key: str, cache: bool) -> pl.DataFrame: +def mock_spice_query( + query: str, api_key: str, cache: bool, refresh: bool +) -> pl.DataFrame: return pl.DataFrame( { "hash": [MOCK_HASH_1, MOCK_HASH_2],