diff --git a/pyproject.toml b/pyproject.toml index 1d4eab16..63cf03d8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -36,8 +36,7 @@ dependencies = [ "aioredis==1.3.1", "aiosqlite==0.19", "alembic==1.13.1", - # "aleph-message~=1.0.1", - "aleph-message @ git+https://github.com/aleph-im/aleph-message@andres-feature-implement_credits_payment", + "aleph-message~=1.0.5", "aleph-superfluid~=0.2.1", "dbus-python==1.3.2", "eth-account~=0.10", diff --git a/src/aleph/vm/orchestrator/views/authentication.py b/src/aleph/vm/orchestrator/views/authentication.py index d6a6182a..a775792e 100644 --- a/src/aleph/vm/orchestrator/views/authentication.py +++ b/src/aleph/vm/orchestrator/views/authentication.py @@ -104,22 +104,22 @@ def payload_must_be_hex(cls, v: bytes) -> bytes: return bytes.fromhex(v.decode()) @model_validator(mode="after") - def check_expiry(values) -> Self: + def check_expiry(self) -> Self: """Check that the token has not expired""" - payload = values.payload + payload = self.payload content = SignedPubKeyPayload.model_validate_json(payload) if not is_token_still_valid(content.expires): raise ValueError("Token expired") - return values + return self @model_validator(mode="after") - def check_signature(values) -> Self: + def check_signature(self) -> Self: """Check that the signature is valid""" - signature = values.signature - payload = values.payload + signature = self.signature + payload = self.payload content = SignedPubKeyPayload.model_validate_json(payload) check_wallet_signature_or_raise(content.address, content.chain, payload, signature) - return values + return self @property def content(self) -> SignedPubKeyPayload: