Skip to content

Fix xdr_to_json panic when output type is Val.#2474

Open
fnando wants to merge 2 commits intomainfrom
fix-2469
Open

Fix xdr_to_json panic when output type is Val.#2474
fnando wants to merge 2 commits intomainfrom
fix-2469

Conversation

@fnando
Copy link
Copy Markdown
Member

@fnando fnando commented Apr 10, 2026

What

Handle other types when printing values using xdr_to_json.

Why

Fix #2469.

Known limitations

[TODO or N/A]

Copilot AI review requested due to automatic review settings April 10, 2026 23:52
@github-project-automation github-project-automation bot moved this to Backlog (Not Ready) in DevX Apr 10, 2026
@fnando fnando self-assigned this Apr 10, 2026
@fnando fnando moved this from Backlog (Not Ready) to Needs Review in DevX Apr 10, 2026
@fnando fnando requested a review from mootz12 April 10, 2026 23:52
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Fixes a panic in xdr_to_json when the declared output type is ScType::Val by adding a fallback conversion path and a regression test tied to issue #2469.

Changes:

  • Add an ScType::Val match arm in Spec::xdr_to_json that delegates to to_json.
  • Add a regression test ensuring ScVal::Bytes formats correctly when output type is ScType::Val.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Needs Review

Development

Successfully merging this pull request may close these issues.

CLI panics when formatting output after successful contract invocation when return type is BytesN<32>

2 participants