Skip to content

Commit

Permalink
feat: return serialized account details
Browse files Browse the repository at this point in the history
  • Loading branch information
polydez committed Apr 3, 2024
1 parent 6ee0686 commit 54d3527
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion proto/proto/responses.proto
Original file line number Diff line number Diff line change
Expand Up @@ -116,5 +116,5 @@ message ListNotesResponse {

message GetPublicAccountDetailsResponse {
// Public account full details.
account.AccountFullDetails details = 1;
bytes details = 1;
}
4 changes: 2 additions & 2 deletions proto/src/generated/responses.rs
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,6 @@ pub struct ListNotesResponse {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetPublicAccountDetailsResponse {
/// Public account full details.
#[prost(message, optional, tag = "1")]
pub details: ::core::option::Option<super::account::AccountFullDetails>,
#[prost(bytes = "vec", tag = "1")]
pub details: ::prost::alloc::vec::Vec<u8>,
}
4 changes: 2 additions & 2 deletions store/src/server/api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ use miden_node_proto::{
},
AccountState,
};
use miden_objects::{notes::Nullifier, BlockHeader, Felt, ZERO};
use miden_objects::{notes::Nullifier, utils::Serializable, BlockHeader, Felt, ZERO};
use tonic::{Response, Status};
use tracing::{debug, info, instrument};

Expand Down Expand Up @@ -181,7 +181,7 @@ impl api_server::Api for StoreApi {
.map_err(internal_error)?;

Ok(Response::new(GetPublicAccountDetailsResponse {
details: Some((&account).into()),
details: account.to_bytes(),
}))
}

Expand Down

0 comments on commit 54d3527

Please sign in to comment.