Skip to content

Work around MintAssets / MintsAssets difference in the codegen #11

@klntsky

Description

@klntsky

The methods for Mint are:

  insert(key: ScriptHash, value: MintAssets): MintAssets | void;
  get(key: ScriptHash): MintsAssets | void;

MintAssets value is being inserted, but get returns MintsAssets. This breaks our codegen assumption for map-like types, that thinks that the exact same type that was put in can be extracted.

We work around this downstream in a very hacky way: https://github.com/mlabs-haskell/purescript-cardano-types/blob/8f9e5d0e0a465990024fac7c8e8db36fcd56ab8c/src/Cardano/Types/Mint.purs#L176

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions