-
Couldn't load subscription status.
- Fork 51
Add validation to the Send form (address and amount) #490
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
base: qt6
Are you sure you want to change the base?
Conversation
|
@MarnixCroes do you mind re-reviewing this change? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- The
Amount must be greater than zerowhile there is only the placeholder text is a bit silly.
Which can be repro'd by entering 0 and then deleting it.
- The amount sometimes changes and gets negative when entering large numbers:
Screencast.from.2025-08-06.11-11-16.webm
Screencast.from.2025-08-06.11-13-03.webm
| } else if (IsValidDestinationString(m_address.toStdString(), *CChainParams::TestNet())) { | ||
| setAddressError(tr("Address is valid for testnet, not the current network")); | ||
| } else { | ||
| setAddressError(tr("Invalid address format")); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| setAddressError(tr("Invalid address format")); | |
| setAddressError(tr("Invalid address")); |
maybe better?
These changes add properties for the error strings used in the QML to SendRecipient and add validation methods that are checked when the relevant properties are changed by the user.
This is a port of #462 into the qt6 branch