There's a bit of code that resets the default values for any given form whenever a form mounts. In issue #3656, the reason why it says "Not enough tokens" is because the "selectedToken" field value for the Simple Payment form is being cleared on mount. This makes the hasEnoughFundsValidation() function trigger the form error because it pretty cannot calculate your funds correctly.
This was also causing the issue which Raul raised about the Mint Tokens form -- it's because selectedToken is undefined at this point -- it got cleared on mount.
For the create domain action, it complains about the createdIn field, and same issue, it's because it got cleared on mount.
But these changes should make all of those go away and unblock testing on QA 🙏
Minting tokens
Creating domains
Simple payments
Testing
Ensure you actually have some CREDS
Open the Simple Payment form
Enter a Token amount
Verify that you don't see the "Not enough tokens" error message
Change the Action type field to "Advanced Payments"
Enter an amount in the token value field
Verify that you don't see the "Not enough tokens" error message
Please test creating domains & minting tokens as well
Description
There's a bit of code that resets the default values for any given form whenever a form mounts. In issue #3656, the reason why it says "Not enough tokens" is because the "selectedToken" field value for the Simple Payment form is being cleared on mount. This makes the
hasEnoughFundsValidation()
function trigger the form error because it pretty cannot calculate your funds correctly.This was also causing the issue which Raul raised about the Mint Tokens form -- it's because
selectedToken
is undefined at this point -- it got cleared on mount.For the create domain action, it complains about the
createdIn
field, and same issue, it's because it got cleared on mount.But these changes should make all of those go away and unblock testing on QA 🙏
Testing
Resolves #3656 Resolves #3664