Skip to content

Commit

Permalink
fixed issue with deserializing intents
Browse files Browse the repository at this point in the history
  • Loading branch information
nerfZael committed Jun 18, 2024
1 parent 9dccf73 commit aca7a32
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion autotx/db.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
from autotx.intents import BuyIntent, Intent, SellIntent, SendIntent
from autotx.token import Token
from autotx.transactions import Transaction, TransactionBase
from autotx.utils.ethereum.eth_address import ETHAddress

SUPABASE_URL = os.getenv("SUPABASE_URL")
SUPABASE_KEY = os.getenv("SUPABASE_SERVICE_ROLE_KEY")
Expand Down Expand Up @@ -115,7 +116,7 @@ def get(self, task_id: str) -> models.Task | None:
def load_intent(intent_data: dict[str, Any]) -> Intent:
if intent_data["type"] == "send":
return SendIntent.create(
receiver=intent_data["to_address"],
receiver=ETHAddress(intent_data["receiver"]),
token=Token(
symbol=intent_data["token"]["symbol"],
address=intent_data["token"]["address"]
Expand Down

0 comments on commit aca7a32

Please sign in to comment.