Skip to content

Commit

Permalink
fix: improve cdp wallet create
Browse files Browse the repository at this point in the history
  • Loading branch information
hyacinthus committed Feb 13, 2025
1 parent adae9c7 commit ebb8bd2
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions app/admin/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,6 @@ async def create_agent(
wallet_data = json.loads(agent_data.cdp_wallet_data)
if not has_wallet:
# create the wallet
logger.debug(
f"key name {config.cdp_api_key_name} , private key {config.cdp_api_key_private_key}"
)
Cdp.configure(
api_key_name=config.cdp_api_key_name,
private_key=config.cdp_api_key_private_key.replace("\\n", "\n"),
Expand All @@ -86,6 +83,11 @@ async def create_agent(
else:
agent_data.cdp_wallet_data = json.dumps(wallet_data)
await agent_data.save()
logger.info(
"Wallet created for agent %s: %s",
latest_agent.id,
wallet_data["default_address_id"],
)
# Send Slack notification
send_slack_message(
message,
Expand Down

0 comments on commit ebb8bd2

Please sign in to comment.