feat(client-auth): emit and require AuthOk for SDK client challenge flow

This commit is contained in:
CleverWild
2026-03-19 19:06:27 +01:00
parent ec70561c93
commit e1a8553142
3 changed files with 63 additions and 10 deletions

View File

@@ -114,6 +114,15 @@ pub async fn test_challenge_auth() {
.await
.unwrap();
let response = test_transport.recv().await.expect("should receive auth ok");
match response {
Ok(resp) => match resp.payload {
Some(ClientResponsePayload::AuthOk(_)) => {}
other => panic!("Expected AuthOk, got {other:?}"),
},
Err(err) => panic!("Expected Ok response, got Err({err:?})"),
}
// Auth completes, session spawned
task.await.unwrap();
}
@@ -178,6 +187,15 @@ pub async fn test_evm_sign_request_payload_is_handled() {
.await
.unwrap();
let response = test_transport.recv().await.expect("should receive auth ok");
match response {
Ok(resp) => match resp.payload {
Some(ClientResponsePayload::AuthOk(_)) => {}
other => panic!("Expected AuthOk, got {other:?}"),
},
Err(err) => panic!("Expected Ok response, got Err({err:?})"),
}
task.await.unwrap();
let tx = TxEip1559 {