Skip to content

Fix incorrect field types in several request structs #108

@kevin-pease

Description

@kevin-pease

There are 3 fields in 2 structs that are of the type Option<Asset<IssuedAsset>>, which is incorrect. It should be possible for them to contain a native asset as well. The affected structs:

  • all_claimable_balances_request: field asset;
  • all_offers_request: fields selling and buying.

The above asset type can be confusing, because we already have an AssetType in our request models. This type, however, can be of 3 types: native, alphanum4, and alphanum12. In some cases, an asset can be of 2 types: native and issued, which is the case for this issue.

We should introduce this new asset type in our request models. We should also check the rest of the codebase if the asset type with 2 options occurs in more request structs, and have them implement the new type.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementAn enhancement of an existing featureinvalidThis doesn't seem right

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions