Skip to content
Open
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
2 changes: 2 additions & 0 deletions cmd/crates/soroban-spec-tools/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -589,6 +589,8 @@ impl Spec {
self.sc_object_to_json(val, type_)?
}

(val, ScType::Val) => to_json(val)?,
Copy link

Copilot AI Apr 8, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR fixes a panic when handling ScType::Val with non-Void values, but does not include tests for this new behavior. While the fix correctly delegates to the existing to_json() function which is well-tested, it would be beneficial to add a test case for xdr_to_json() with ScType::Val to prevent regressions. This is especially important since the test suite includes tests for related functions like to_json() and the soroban-test integration tests likely test contract return values.

Copilot uses AI. Check for mistakes.

(ScVal::Error(_), ScType::Error) => todo!(),
(v, typed) => todo!("{v:#?} doesn't have a matching {typed:#?}"),
})
Expand Down
Loading