Skip to content

Commit

Permalink
fix missing dleq proof in db (#380)
Browse files Browse the repository at this point in the history
  • Loading branch information
callebtc authored Dec 6, 2023
1 parent e6ed8fd commit 375b278
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions cashu/core/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,9 @@ class Proof(BaseModel):
def from_dict(cls, proof_dict: dict):
if proof_dict.get("dleq") and isinstance(proof_dict["dleq"], str):
proof_dict["dleq"] = DLEQWallet(**json.loads(proof_dict["dleq"]))
else:
# overwrite the empty string with None
proof_dict["dleq"] = None
c = cls(**proof_dict)
return c

Expand Down

0 comments on commit 375b278

Please sign in to comment.