You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In packages/xrpl/src/models/transactions/common.ts, we currently have two helper functions that are the standard for all transaction validate functions to use for each field.
-validateRequiredField()
-validateOptionalField()
However, the message is vague ("invalid field XXX", etc), and we would like to tailor the message to the exact type for better user experience and debugging. For example, "Invalid field XXX" should become "XXX must be a string", and the type can either be inferred by the checkValidity parameter of these helper methods or a new parameter can be added for the exact type to provide in the error messaging (there is flexibility with the exact formatting, can be "Expected type String, received type YYY", etc)
In packages/xrpl/src/models/transactions/common.ts, we currently have two helper functions that are the standard for all transaction validate functions to use for each field.
-validateRequiredField()
-validateOptionalField()
However, the message is vague ("invalid field XXX", etc), and we would like to tailor the message to the exact type for better user experience and debugging. For example, "Invalid field XXX" should become "XXX must be a string", and the type can either be inferred by the checkValidity parameter of these helper methods or a new parameter can be added for the exact type to provide in the error messaging (there is flexibility with the exact formatting, can be "Expected type String, received type YYY", etc)
Conversation: https://github.com/XRPLF/xrpl.js/pull/2829/files#r1893062063
Noticed in #2829
The text was updated successfully, but these errors were encountered: