Skip to content

Commit

Permalink
Update integration test WALLETS_COIN_SELECTION_02.
Browse files Browse the repository at this point in the history
Update integration test `WALLETS_COIN_SELECTION_02` to check that the
set of coin selection outputs is exactly the same as intially provided,
rather than being a subset.
  • Loading branch information
jonathanknowles committed Oct 19, 2020
1 parent c6b0f9c commit 4b63945
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
Expand Up @@ -946,7 +946,6 @@ spec = describe "SHELLEY_WALLETS" $ do
(`shouldBe` (output :| []))
]

let satisfy = flip shouldSatisfy
it "WALLETS_COIN_SELECTION_02 - \
\Multiple payments are all included in the coin selection output." $
\ctx -> do
Expand All @@ -967,9 +966,7 @@ spec = describe "SHELLEY_WALLETS" $ do
, expectField
#inputs (`shouldSatisfy` (not . null))
, expectField
#outputs (satisfy $ (> paymentCount) . length)
, expectField
#outputs (satisfy $ flip all outputs . flip elem)
#outputs (`shouldSatisfy` ((NE.sort outputs ==) . NE.sort))
]

it "WALLETS_COIN_SELECTION_03 - \
Expand Down
2 changes: 1 addition & 1 deletion lib/core/src/Cardano/Wallet/Api/Types.hs
Expand Up @@ -434,7 +434,7 @@ data ApiCoinSelectionInput (n :: NetworkDiscriminant) = ApiCoinSelectionInput
data ApiCoinSelectionOutput (n :: NetworkDiscriminant) = ApiCoinSelectionOutput
{ address :: !(ApiT Address, Proxy n)
, amount :: !(Quantity "lovelace" Natural)
} deriving (Eq, Generic, Show)
} deriving (Eq, Ord, Generic, Show)

data ApiWallet = ApiWallet
{ id :: !(ApiT WalletId)
Expand Down

0 comments on commit 4b63945

Please sign in to comment.