Conversation
GuillemGarciaDev
left a comment
There was a problem hiding this comment.
@UndeadDemidov some nitpick comments and some relevant changes required, thanks for contributing!
|
@GuillemGarciaDev, finally I've moved errors to variables |
| // Validate checks if the MPTokenMetadata has all required fields populated. | ||
| // Required fields are: Ticker, AssetClass, AssetSubclass, and Name. | ||
| // Returns an error if any required field is empty or contains only whitespace. | ||
| func (m MPTokenMetadata) Validate() error { |
There was a problem hiding this comment.
There are non-allowed values that are not checked. See https://github.com/XRPLF/XRPL-Standards/tree/master/XLS-0089-multi-purpose-token-metadata-schema#2-base-metadata-schema
There was a problem hiding this comment.
Allowed Values column contains all details about how to validate each MPTokenMetadata values
| Desc string `json:"desc,omitempty"` // Description of the token | ||
| Icon string `json:"icon,omitempty"` // URL to token icon image | ||
| AssetClass string `json:"asset_class"` // Primary classification of the asset | ||
| AssetSubclass string `json:"asset_subclass"` // Secondary classification of the asset |
There was a problem hiding this comment.
Missing omitempty
|
Closing this PR since all changes have been already included in the latest release. Nonetheless, thanks for your contribution! |
Title
Description
This PR aims to support XLS-0089d.
Type of change
Checklist:
Changes