Skip to content

Commit

Permalink
fix: remove redundant code & temp disable zapper load
Browse files Browse the repository at this point in the history
  • Loading branch information
tomfutago committed Dec 12, 2024
1 parent 88aec2b commit ebaeef4
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions wallet_pipeline/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -204,9 +204,6 @@ def pull_zapper_positions(api_key: str, cover_id: int, address: str):
def pull_cover_wallets():
df = dune.run_query_dataframe(QueryBase(query_id=4340708))

# flush & fill load
clean_up_db(table_name="cover_wallets", truncate_table=True)

if not df.empty:
# check if table exists
query = f"SELECT COUNT(*)::BOOLEAN AS cnt FROM duckdb_tables() WHERE table_name = 'cover_wallets'"
Expand Down Expand Up @@ -254,8 +251,8 @@ def loop_through_cover_wallets():
address = row["monitored_wallet"]
current_api = "zerion"
pull_zerion_positions(api_key=zerion_api_key, cover_id=cover_id, address=address)
current_api = "zapper"
pull_zapper_positions(api_key=zapper_api_key, cover_id=cover_id, address=address)
#current_api = "zapper"
#pull_zapper_positions(api_key=zapper_api_key, cover_id=cover_id, address=address)

except Exception as e:
print(f"error for {current_api} and {address}: {e}")
Expand All @@ -268,8 +265,8 @@ def loop_through_cover_wallets():
#pull_zapper_positions(api_key=zapper_api_key, cover_id=-1, address="0x036d6e8b88e21760f6759a31dabc8bdf3f026b98")

# refresh base Dune data (flush & fill)
pull_capital_pool()
pull_cover_wallets()
#pull_capital_pool()
#pull_cover_wallets()

# load wallets data
#clean_up_db(table_name="zerion_positions", drop_table=False, truncate_table=True)
Expand Down

0 comments on commit ebaeef4

Please sign in to comment.