From 087da6c25dd27d1d4c1bdf84bc4bba680f1ce46b Mon Sep 17 00:00:00 2001 From: Jonathan Knowles Date: Tue, 1 Mar 2022 04:03:04 +0000 Subject: [PATCH] Change type of `outputReportedAsExceedingLimit` to `(Address, TokenBundle)`. --- lib/core/src/Cardano/Wallet/CoinSelection/Internal.hs | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/lib/core/src/Cardano/Wallet/CoinSelection/Internal.hs b/lib/core/src/Cardano/Wallet/CoinSelection/Internal.hs index 8d8cfc2b53e..6df1bd7d84f 100644 --- a/lib/core/src/Cardano/Wallet/CoinSelection/Internal.hs +++ b/lib/core/src/Cardano/Wallet/CoinSelection/Internal.hs @@ -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 @@ -1135,7 +1135,7 @@ verifySelectionOutputError cs ps = \case newtype FailureToVerifySelectionOutputSizeExceedsLimitError = FailureToVerifySelectionOutputSizeExceedsLimitError - { outputReportedAsExceedingLimit :: TxOut } + { outputReportedAsExceedingLimit :: (Address, TokenBundle) } deriving (Eq, Show) verifySelectionOutputSizeExceedsLimitError @@ -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