diff --git a/src/token_decimals.py b/src/token_decimals.py index 3675a74..a5ef1db 100644 --- a/src/token_decimals.py +++ b/src/token_decimals.py @@ -25,7 +25,7 @@ def update_token_decimals(engine, web3) -> None: if __name__ == "__main__": - engine = create_engine(f"postgresql+psycopg2://{getenv('SOLVER_SLIPPAGE_DB_URL')}") + engine = create_engine(f"postgresql+psycopg://{getenv('SOLVER_SLIPPAGE_DB_URL')}") web3 = Web3(Web3.HTTPProvider(getenv("NODE_URL"))) update_token_decimals(engine, web3) diff --git a/tests/unit/test_database.py b/tests/unit/test_database.py index 95af032..a6c54a4 100644 --- a/tests/unit/test_database.py +++ b/tests/unit/test_database.py @@ -8,7 +8,7 @@ def tests_write_transaction_timestamp(): engine = create_engine( - f"postgresql+psycopg2://postgres:postgres@localhost:5432/mainnet" + f"postgresql+psycopg://postgres:postgres@localhost:5432/mainnet" ) db = Database(engine, "mainnet") # truncate table @@ -38,7 +38,7 @@ def tests_write_transaction_tokens(): # import has to happen after patching environment variable engine = create_engine( - f"postgresql+psycopg2://postgres:postgres@localhost:5432/mainnet" + f"postgresql+psycopg://postgres:postgres@localhost:5432/mainnet" ) db = Database(engine, "mainnet") transaction_tokens = [ @@ -69,7 +69,7 @@ def tests_write_transaction_tokens(): def tests_write_prices(): engine = create_engine( - f"postgresql+psycopg2://postgres:postgres@localhost:5432/mainnet" + f"postgresql+psycopg://postgres:postgres@localhost:5432/mainnet" ) db = Database(engine, "mainnet") token_prices = [ @@ -109,7 +109,7 @@ def test_get_latest_transaction(): from src.helpers.database import Database engine = create_engine( - f"postgresql+psycopg2://postgres:postgres@localhost:5432/mainnet" + f"postgresql+psycopg://postgres:postgres@localhost:5432/mainnet" ) db = Database(engine, "mainnet") # truncate table