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: vector arguments #451

Merged
merged 9 commits into from
Mar 24, 2023
Merged

fix: vector arguments #451

merged 9 commits into from
Mar 24, 2023

Conversation

statictype
Copy link
Contributor

fixes #431

For case 2 we display a new input which accepts a hex representation of Bytes.
I figure this is a bit better UX than working with decimal digits.

can you please test @xermicus?

@netlify
Copy link

netlify bot commented Mar 24, 2023

Deploy Preview for contracts-ui ready!

Name Link
🔨 Latest commit f871c7e
🔍 Latest deploy log https://app.netlify.com/sites/contracts-ui/deploys/641dbb6616b6710007460b61
😎 Deploy Preview https://deploy-preview-451--contracts-ui.netlify.app/
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

Copy link

@xermicus xermicus left a comment

Choose a reason for hiding this comment

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

This fixes the problem for me, thanks!

I also really like the new UX for bytes, way more convenient for larger byte arrays. However, I have a nitpick. The bytes input can be an odd number of hex digits. Considering an input of 0xBBB, it's not clear whether this will resolve to 0xBBB0 or 0x0BBB which are not the same. I suggest to only allow an even number of bytes (or 0).

@statictype
Copy link
Contributor Author

0xBBB resolves to 0xBBB0

ideally we would have validation for these dynamic argument inputs but at the moment it's not possible. it needs a large refactoring.
i added a message below the input when the length is odd which clarifies the behaviour, but it doesn't prevent submitting the form.

@statictype statictype merged commit c73e93b into master Mar 24, 2023
@statictype statictype deleted the ae-fix-vec branch March 24, 2023 17:19
@statictype statictype mentioned this pull request Jun 19, 2023
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.

Broken UI for messages with vector arguments
2 participants