Skip to content

Commit

Permalink
Remove unused function Coin.toQuantityMaybe.
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathanknowles committed Dec 20, 2023
1 parent 7161e5d commit 986b80c
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions lib/primitive/lib/Cardano/Wallet/Primitive/Types/Coin.hs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ module Cardano.Wallet.Primitive.Types.Coin
, toInteger
, toNatural
, toQuantity
, toQuantityMaybe
, toWord64Maybe

-- * Conversions (Unsafe)
Expand Down Expand Up @@ -195,17 +194,6 @@ toQuantity
-> Quantity "lovelace" i
toQuantity (Coin c) = Quantity (intCast c)

-- | Converts a 'Coin' to a 'Quantity'.
--
-- Returns 'Nothing' if the given value does not fit within the bounds of
-- the target type.
--
toQuantityMaybe
:: (Bits i, Integral i)
=> Coin
-> Maybe (Quantity "lovelace" i)
toQuantityMaybe (Coin c) = Quantity <$> intCastMaybe c

-- | Converts a 'Coin' to a 'Word64' value.
--
-- Returns 'Nothing' if the given value does not fit within the bounds of a
Expand Down

0 comments on commit 986b80c

Please sign in to comment.