Skip to content

Commit

Permalink
Build fix
Browse files Browse the repository at this point in the history
  • Loading branch information
kamilsa committed Jul 26, 2017
1 parent 918e250 commit a076155
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
10 changes: 7 additions & 3 deletions irohad/model/converters/impl/pb_query_response_factory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -112,15 +112,19 @@ namespace iroha {
protocol::AccountAssetResponse PbQueryResponseFactory::serialize(
const model::AccountAssetResponse &accountAssetResponse) const {
protocol::AccountAssetResponse pb_response;
pb_response.mutable_asset()->CopyFrom(
serialize(accountAssetResponse.acct_asset));
auto pb_account_asset = pb_response.mutable_account_asset();
pb_account_asset->set_asset_id(accountAssetResponse.acct_asset.asset_id);
pb_account_asset->set_account_id(accountAssetResponse.acct_asset.account_id);
pb_account_asset->set_balance(accountAssetResponse.acct_asset.balance);
return pb_response;
}

model::AccountAssetResponse PbQueryResponseFactory::deserialize(
const protocol::AccountAssetResponse &account_asset_response) const {
model::AccountAssetResponse res;
res.acct_asset = deserialize(account_asset_response.asset());
res.acct_asset.balance = account_asset_response.account_asset().balance();
res.acct_asset.account_id = account_asset_response.account_asset().account_id();
res.acct_asset.asset_id = account_asset_response.account_asset().asset_id();
return res;
}

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

// *** Responses *** //
message AccountAssetResponse {
Asset asset = 1;
AccountAsset account_asset = 1;
}

message AccountResponse {
Expand Down

0 comments on commit a076155

Please sign in to comment.