Skip to content

Commit

Permalink
fix: auth resp
Browse files Browse the repository at this point in the history
  • Loading branch information
Archento committed Jun 27, 2024
1 parent 17bdae2 commit b1eda7d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/babble/auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def authenticate(identity: Identity, name: str = None) -> Tuple[str, TokenMetada
if not resp or "challenge" not in resp or "nonce" not in resp:
return None, None

payload = resp["challenge"]
payload: str = resp["challenge"]

# create the signature
_, signature = identity.sign_arbitrary(payload.encode())
Expand All @@ -61,7 +61,7 @@ def authenticate(identity: Identity, name: str = None) -> Tuple[str, TokenMetada
login_resp = send_post_request(
f"{AUTH_SERVER}/auth/login/wallet/verify", login_request
)
if not login_resp or "access_token" not in login_resp:
if not login_resp:
return None, None

token_resp = send_post_request(f"{AUTH_SERVER}/tokens", login_resp)
Expand Down
4 changes: 2 additions & 2 deletions tests/test_interaction.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def test_simple_interaction_main(self):
client1 = create_client(CLIENT_1_SEED, MAINNET_CHAIN_ID)
client2 = create_client(CLIENT_2_SEED, MAINNET_CHAIN_ID)

message = "why hello there " + datetime.now(timezone.utc).isoformat()
message = "now: " + datetime.now(timezone.utc).isoformat()

client1.send(client2.delegate_address, message)

Expand All @@ -51,7 +51,7 @@ def test_simple_interaction_test(self):
client1_dorado = create_client(CLIENT_1_SEED, TESTNET_CHAIN_ID)
client2_dorado = create_client(CLIENT_2_SEED, TESTNET_CHAIN_ID)

message = "why hello there on dorado" + datetime.now(timezone.utc).isoformat()
message = "now on dorado: " + datetime.now(timezone.utc).isoformat()

client1_dorado.send(client2_dorado.delegate_address, message)

Expand Down

0 comments on commit b1eda7d

Please sign in to comment.