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: CP-9311 x and p send set address #83

Merged
merged 4 commits into from
Nov 4, 2024

Conversation

vvava
Copy link
Contributor

@vvava vvava commented Oct 28, 2024

Description

We don't want to completely control the contact input anymore.

Changes

Let the user changes the address to any value.

Testing

Go to send on X or P chain -> try to change the address -> it hould let you set an empty string or whatever you want meanwhile it validates correctly.

Screenshots:

Screen.Recording.2024-10-28.at.16.49.34.mov

Checklist for the author

Tick each of them when done or if not applicable.

  • I've covered new/modified business logic with Jest test cases.
  • I've tested the changes myself before sending it to code review and QA.

Copy link
Member

@meeh0w meeh0w left a comment

Choose a reason for hiding this comment

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

I see a few possible problems here:

  • It's no longer possible to enter the address without the prefix, which I think should always be possible.
    • If we want the prefix to be required (and correspond to the active network), we should have a clear error message for it, for example Invalid address prefix, X-Chain address is required. Right now it says Address is invalid, but it is in fact valid.
  • When you enter the address without the prefix, it does not recognize it anymore - even if it's your own account.
valid-is-invalid.mov

meeh0w
meeh0w previously approved these changes Oct 31, 2024
Copy link
Member

@meeh0w meeh0w left a comment

Choose a reason for hiding this comment

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

It still does not recognize unprefixed addresses, but it's not a biggie I think 👍

Copy link
Member

@meeh0w meeh0w left a comment

Choose a reason for hiding this comment

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

🎉

@vvava vvava merged commit e1f7fb8 into main Nov 4, 2024
5 checks passed
@vvava vvava deleted the fix/CP-9311_-send-address-prefix branch November 4, 2024 15:38
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.

3 participants