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 BytesN to ScVal conversion in testutils #1442

Merged
merged 2 commits into from
Feb 25, 2025

Conversation

leighmcculloch
Copy link
Member

What

Change BytesN to ScVal conversion from TryFrom to From in test utilities.

Why

Unwrapping is safe because values in test environment must be valid ScVal. Even if this was wrong, it's a good tradeoff that improves the developer experience. The Bytes->ScVal and String->ScVal conversions already use this pattern and it seems BytesN wasn't updated at the same time to use that pattern.

@leighmcculloch leighmcculloch marked this pull request as ready for review February 25, 2025 06:36
@leighmcculloch leighmcculloch requested a review from a team February 25, 2025 06:36
@leighmcculloch leighmcculloch changed the title Simplify BytesN to ScVal conversion in SDK test utils Simplify BytesN to ScVal conversion in testutils Feb 25, 2025
@leighmcculloch leighmcculloch changed the title Simplify BytesN to ScVal conversion in testutils Fix BytesN to ScVal conversion in testutils Feb 25, 2025
@leighmcculloch
Copy link
Member Author

Build failure being fixed by:

@leighmcculloch leighmcculloch added this pull request to the merge queue Feb 25, 2025
Merged via the queue into main with commit c1d2b5c Feb 25, 2025
17 checks passed
@leighmcculloch leighmcculloch deleted the simplify-bytes-scval-conversion branch February 25, 2025 20:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants