Skip to content

Feat/xls 0089d#161

Closed
UndeadDemidov wants to merge 5 commits intoXRPLF:mainfrom
UndeadDemidov:feat/XLS-0089d
Closed

Feat/xls 0089d#161
UndeadDemidov wants to merge 5 commits intoXRPLF:mainfrom
UndeadDemidov:feat/XLS-0089d

Conversation

@UndeadDemidov
Copy link

Title

Description

This PR aims to support XLS-0089d.

Type of change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation update
  • Refactoring

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code where needed
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective
  • New and existing unit tests pass locally with my changes

Changes

  • Added MPTokenMetadata struct
  • Added Blob meth for encoding
  • Added meth for Blob to struct decoding
  • Changed existing tests

Copy link
Collaborator

@GuillemGarciaDev GuillemGarciaDev left a comment

Choose a reason for hiding this comment

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

@UndeadDemidov some nitpick comments and some relevant changes required, thanks for contributing!

@UndeadDemidov
Copy link
Author

@GuillemGarciaDev, finally I've moved errors to variables
sorry, I've missed out package path you've requested.

// 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 {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Copy link
Collaborator

Choose a reason for hiding this comment

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

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
Copy link
Collaborator

Choose a reason for hiding this comment

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

Missing omitempty

@GuillemGarciaDev
Copy link
Collaborator

Closing this PR since all changes have been already included in the latest release. Nonetheless, thanks for your contribution!

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.

2 participants