refactor(proto): align remaining ClientConnection protobuf pairs with SdkClient* naming
This commit is contained in:
@@ -106,15 +106,15 @@ enum VaultState {
|
||||
VAULT_STATE_ERROR = 4;
|
||||
}
|
||||
|
||||
message ClientConnectionRequest {
|
||||
message SdkClientConnectionRequest {
|
||||
bytes pubkey = 1;
|
||||
}
|
||||
|
||||
message ClientConnectionResponse {
|
||||
message SdkClientConnectionResponse {
|
||||
bool approved = 1;
|
||||
}
|
||||
|
||||
message ClientConnectionCancel {}
|
||||
message SdkClientConnectionCancel {}
|
||||
|
||||
message UserAgentRequest {
|
||||
oneof payload {
|
||||
@@ -128,7 +128,7 @@ message UserAgentRequest {
|
||||
arbiter.evm.EvmGrantCreateRequest evm_grant_create = 8;
|
||||
arbiter.evm.EvmGrantDeleteRequest evm_grant_delete = 9;
|
||||
arbiter.evm.EvmGrantListRequest evm_grant_list = 10;
|
||||
ClientConnectionResponse client_connection_response = 11;
|
||||
SdkClientConnectionResponse sdk_client_connection_response = 11;
|
||||
SdkClientApproveRequest sdk_client_approve = 12;
|
||||
SdkClientRevokeRequest sdk_client_revoke = 13;
|
||||
google.protobuf.Empty sdk_client_list = 14;
|
||||
@@ -146,8 +146,8 @@ message UserAgentResponse {
|
||||
arbiter.evm.EvmGrantCreateResponse evm_grant_create = 8;
|
||||
arbiter.evm.EvmGrantDeleteResponse evm_grant_delete = 9;
|
||||
arbiter.evm.EvmGrantListResponse evm_grant_list = 10;
|
||||
ClientConnectionRequest client_connection_request = 11;
|
||||
ClientConnectionCancel client_connection_cancel = 12;
|
||||
SdkClientConnectionRequest sdk_client_connection_request = 11;
|
||||
SdkClientConnectionCancel sdk_client_connection_cancel = 12;
|
||||
SdkClientApproveResponse sdk_client_approve = 13;
|
||||
SdkClientRevokeResponse sdk_client_revoke = 14;
|
||||
SdkClientListResponse sdk_client_list = 15;
|
||||
|
||||
@@ -3,8 +3,8 @@ use std::{ops::DerefMut, sync::Mutex};
|
||||
use arbiter_proto::proto::{
|
||||
evm as evm_proto,
|
||||
user_agent::{
|
||||
ClientConnectionCancel, ClientConnectionRequest, SdkClientApproveRequest,
|
||||
SdkClientApproveResponse, SdkClientEntry, SdkClientError as ProtoSdkClientError,
|
||||
SdkClientApproveRequest, SdkClientApproveResponse, SdkClientConnectionCancel,
|
||||
SdkClientConnectionRequest, SdkClientEntry, SdkClientError as ProtoSdkClientError,
|
||||
SdkClientList, SdkClientListResponse, SdkClientRevokeRequest, SdkClientRevokeResponse,
|
||||
UnsealEncryptedKey, UnsealResult, UnsealStart, UnsealStartResponse, UserAgentRequest,
|
||||
UserAgentResponse, sdk_client_approve_response, sdk_client_list_response,
|
||||
@@ -127,7 +127,7 @@ impl UserAgentSession {
|
||||
ctx: &mut Context<Self, Result<bool, Error>>,
|
||||
) -> Result<bool, Error> {
|
||||
self.send_msg(
|
||||
UserAgentResponsePayload::ClientConnectionRequest(ClientConnectionRequest {
|
||||
UserAgentResponsePayload::SdkClientConnectionRequest(SdkClientConnectionRequest {
|
||||
pubkey: client_pubkey.as_bytes().to_vec(),
|
||||
}),
|
||||
ctx,
|
||||
@@ -135,8 +135,9 @@ impl UserAgentSession {
|
||||
.await?;
|
||||
|
||||
let extractor = |msg| {
|
||||
if let UserAgentRequestPayload::ClientConnectionResponse(client_connection_response) =
|
||||
msg
|
||||
if let UserAgentRequestPayload::SdkClientConnectionResponse(
|
||||
client_connection_response,
|
||||
) = msg
|
||||
{
|
||||
Some(client_connection_response)
|
||||
} else {
|
||||
@@ -148,7 +149,7 @@ impl UserAgentSession {
|
||||
_ = cancel_flag.changed() => {
|
||||
info!(actor = "useragent", "client connection approval cancelled");
|
||||
self.send_msg(
|
||||
UserAgentResponsePayload::ClientConnectionCancel(ClientConnectionCancel {}),
|
||||
UserAgentResponsePayload::SdkClientConnectionCancel(SdkClientConnectionCancel {}),
|
||||
ctx,
|
||||
).await?;
|
||||
Ok(false)
|
||||
|
||||
Reference in New Issue
Block a user