Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(torii-grpc): layout decoding #2011

Merged
merged 2 commits into from
May 28, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions crates/torii/grpc/src/server/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@
contract_address: model.3,
packed_size: model.4,
unpacked_size: model.5,
layout: hex::decode(&model.6).unwrap(),
layout: model.6.as_bytes().to_vec(),

Check warning on line 135 in crates/torii/grpc/src/server/mod.rs

View check run for this annotation

Codecov / codecov/patch

crates/torii/grpc/src/server/mod.rs#L135

Added line #L135 was not covered by tests
schema: serde_json::to_vec(&schema).unwrap(),
});
}
Expand Down Expand Up @@ -474,7 +474,7 @@
.await?;

let schema = self.model_cache.schema(&model).await?;
let layout = hex::decode(&layout).unwrap();
let layout = layout.as_bytes().to_vec();

Check warning on line 477 in crates/torii/grpc/src/server/mod.rs

View check run for this annotation

Codecov / codecov/patch

crates/torii/grpc/src/server/mod.rs#L477

Added line #L477 was not covered by tests

Ok(proto::types::ModelMetadata {
name,
Expand Down
Loading