diff --git a/plutus-ledger-api/src/PlutusLedgerApi/V1/Value.hs b/plutus-ledger-api/src/PlutusLedgerApi/V1/Value.hs index 24779aeb042..82eef13fb91 100644 --- a/plutus-ledger-api/src/PlutusLedgerApi/V1/Value.hs +++ b/plutus-ledger-api/src/PlutusLedgerApi/V1/Value.hs @@ -359,6 +359,9 @@ valueOf (Value mp) cur tn = {-# INLINABLE currencySymbolValueOf #-} -- | Get the total value of the currency symbol in the 'Value' map. -- Assumes that the underlying map doesn't contain duplicate keys. +-- +-- Note that each token of the currency symbol may have a value that is positive, +-- zero or negative. currencySymbolValueOf :: Value -> CurrencySymbol -> Integer currencySymbolValueOf (Value mp) cur = case Map.lookup cur mp of Nothing -> 0