Skip to content

Commit

Permalink
Change type of outputReportedAsExceedingLimit to `(Address, TokenBu…
Browse files Browse the repository at this point in the history
…ndle)`.
  • Loading branch information
jonathanknowles committed Mar 1, 2022
1 parent a50b6b1 commit 087da6c
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions lib/core/src/Cardano/Wallet/CoinSelection/Internal.hs
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ import Cardano.Wallet.Primitive.Types.TokenMap
import Cardano.Wallet.Primitive.Types.TokenQuantity
( TokenQuantity )
import Cardano.Wallet.Primitive.Types.Tx
( TokenBundleSizeAssessment (..), TxOut (..), txOutMaxTokenQuantity )
( TokenBundleSizeAssessment (..), txOutMaxTokenQuantity )
import Cardano.Wallet.Primitive.Types.UTxOSelection
( UTxOSelection )
import Control.Monad
Expand Down Expand Up @@ -1135,7 +1135,7 @@ verifySelectionOutputError cs ps = \case

newtype FailureToVerifySelectionOutputSizeExceedsLimitError =
FailureToVerifySelectionOutputSizeExceedsLimitError
{ outputReportedAsExceedingLimit :: TxOut }
{ outputReportedAsExceedingLimit :: (Address, TokenBundle) }
deriving (Eq, Show)

verifySelectionOutputSizeExceedsLimitError
Expand All @@ -1149,10 +1149,9 @@ verifySelectionOutputSizeExceedsLimitError cs _ps e =
TokenBundleSizeWithinLimit -> True
TokenBundleSizeExceedsLimit -> False
where
bundle = outputReportedAsExceedingLimit ^. #tokens
bundle = snd outputReportedAsExceedingLimit

outputReportedAsExceedingLimit = uncurry TxOut
(e ^. #outputThatExceedsLimit)
outputReportedAsExceedingLimit = e ^. #outputThatExceedsLimit

--------------------------------------------------------------------------------
-- Selection error verification: output token quantity errors
Expand Down

0 comments on commit 087da6c

Please sign in to comment.