diff --git a/cashu/core/base.py b/cashu/core/base.py index dd9a248..d54913a 100644 --- a/cashu/core/base.py +++ b/cashu/core/base.py @@ -268,8 +268,10 @@ class MintKeyset: def from_row(cls, row: Row): if row is None: return cls + # fix to convert byte to string, unclear why this is necessary + id = row[0].decode("ascii") if type(row[0]) == bytes else row[0] return cls( - id=row[0].decode("ascii"), + id=id, derivation_path=row[1], valid_from=row[2], valid_to=row[3], diff --git a/cashu/core/crypto.py b/cashu/core/crypto.py index 15a8023..379d3ed 100644 --- a/cashu/core/crypto.py +++ b/cashu/core/crypto.py @@ -1,6 +1,7 @@ +import base64 import hashlib from typing import Dict, List -import base64 + from cashu.core.secp import PrivateKey, PublicKey from cashu.core.settings import MAX_ORDER diff --git a/cashu/mint/router.py b/cashu/mint/router.py index e7842d7..ae78859 100644 --- a/cashu/mint/router.py +++ b/cashu/mint/router.py @@ -15,7 +15,6 @@ from cashu.core.base import ( SplitRequest, ) from cashu.core.errors import CashuError - from cashu.mint import ledger router: APIRouter = APIRouter()