Skip to content

Commit

Permalink
Merge branch 'djeck1432:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
Akshola00 authored Dec 18, 2024
2 parents e9133ea + 3512877 commit 26e87fb
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions web_app/db/seed_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,10 @@ def create_users(session: SessionLocal) -> list[User]:
"""
users = []
for _ in range(10):
wallet_id = fake.unique.uuid4()
print('wallet_id:', wallet_id)
user = User(
wallet_id=fake.unique.uuid4(),
wallet_id=wallet_id,
contract_address=fake.address(),
is_contract_deployed=fake.boolean(),
)
Expand All @@ -49,7 +51,7 @@ def create_positions(session: SessionLocal, users: list[User]) -> None:
for _ in range(2):
position = Position(
user_id=user.id,
token_symbol=fake.random_choices(
token_symbol=fake.random_element(
elements=[token.name for token in TokenParams.tokens()]
),
amount=fake.random_number(digits=5),
Expand Down Expand Up @@ -157,8 +159,8 @@ def create_vaults(session: SessionLocal, users: list[User]) -> None:
# Populate the database
users = create_users(session)
create_positions(session, users)
create_airdrops(session, users)
create_telegram_users(session, users)
# create_airdrops(session, users)
# create_telegram_users(session, users)
create_vaults(session, users)

logger.info("Database populated with fake data.")

0 comments on commit 26e87fb

Please sign in to comment.