Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simplify multi-asset value conversions. #4125

Merged
merged 2 commits into from
Sep 14, 2023

Commits on Sep 13, 2023

  1. Use toWalletTokenBundle in Primitive.Tx.Features.Outputs.

    In particular, we simplify expressions of the following form:
    
    - `fromCardanoValue . Cardano.fromMaryValue`
    
    The above expression peforms the following two-step conversion:
    
    - From a ledger MA value (nested map) to a cardano-api MA value (flat map)
    - From a cardano-api MA value (flat map) to a wallet MA value (nested map)
    
    The `toWalletTokenBundle` function performs this conversion in a single step.
    jonathanknowles committed Sep 13, 2023
    Configuration menu
    Copy the full SHA
    205bdb4 View commit details
    Browse the repository at this point in the history
  2. Use toWalletTokenBundle in Primitive.Tx.Features.CollateralOutputs.

    In particular, we simplify expressions of the following form:
    
    - `fromCardanoValue . Cardano.fromMaryValue`
    
    The above expression peforms the following two-step conversion:
    
    - From a ledger MA value (nested map) to a cardano-api MA value (flat map)
    - From a cardano-api MA value (flat map) to a wallet MA value (nested map)
    
    The `toWalletTokenBundle` function performs this conversion in a single step.
    jonathanknowles committed Sep 13, 2023
    Configuration menu
    Copy the full SHA
    893ece8 View commit details
    Browse the repository at this point in the history