Skip to content

Fix xdr_to_json panic when output type is Val.#2474

Merged
mootz12 merged 3 commits intomainfrom
fix-2469
Apr 13, 2026
Merged

Fix xdr_to_json panic when output type is Val.#2474
mootz12 merged 3 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.

@mootz12 mootz12 merged commit 46bfb04 into main Apr 13, 2026
213 checks passed
@mootz12 mootz12 deleted the fix-2469 branch April 13, 2026 16:53
@github-project-automation github-project-automation bot moved this from Needs Review to Done in DevX Apr 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

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>

3 participants