Skip to content

Commit

Permalink
fix: type shadowing in proto file (#481)
Browse files Browse the repository at this point in the history
* fix: change field name in `GetAccountDetailsResponse`

* update: CHANGELOG
  • Loading branch information
tomyrd authored Sep 3, 2024
1 parent 8dc465e commit 424a18c
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
## v0.6.0 (TBD)

- Optimized state synchronizations by removing unnecessary fetching and parsing of note details (#462).
- [BREAKING] Changed `GetAccountDetailsResponse` field to `details` (#481).

## 0.5.0 (2024-08-27)

Expand Down
2 changes: 1 addition & 1 deletion crates/proto/src/generated/responses.rs
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ pub struct ListNotesResponse {
pub struct GetAccountDetailsResponse {
/// Account info (with details for on-chain accounts)
#[prost(message, optional, tag = "1")]
pub account: ::core::option::Option<super::account::AccountInfo>,
pub details: ::core::option::Option<super::account::AccountInfo>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
Expand Down
2 changes: 1 addition & 1 deletion crates/rpc-proto/proto/responses.proto
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ message ListNotesResponse {

message GetAccountDetailsResponse {
// Account info (with details for on-chain accounts)
account.AccountInfo account = 1;
account.AccountInfo details = 1;
}

message GetBlockByNumberResponse {
Expand Down
2 changes: 1 addition & 1 deletion crates/store/src/server/api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@ impl api_server::Api for StoreApi {
.map_err(internal_error)?;

Ok(Response::new(GetAccountDetailsResponse {
account: Some((&account_info).into()),
details: Some((&account_info).into()),
}))
}

Expand Down
2 changes: 1 addition & 1 deletion proto/responses.proto
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ message ListNotesResponse {

message GetAccountDetailsResponse {
// Account info (with details for on-chain accounts)
account.AccountInfo account = 1;
account.AccountInfo details = 1;
}

message GetBlockByNumberResponse {
Expand Down

0 comments on commit 424a18c

Please sign in to comment.