Skip to content
Browse files

Fix bug in coin selection

  • Loading branch information...
j-mueller committed Apr 15, 2019
1 parent 40a9675 commit e5199ef5ea4e4ed98ad205c1ec63d357cf6820d5
Showing with 1 addition and 1 deletion.
  1. +1 −1 wallet-api/src/Wallet/Emulator/Types.hs
@@ -269,7 +269,7 @@ instance WalletAPI MockWallet where
pubK = toPublicKey privK
(spend, change) <- selectCoin (second txOutValue <$> Map.toList fnds) vl
txOutput = if change then Just (pubKeyTxOut change pubK) else Nothing
txOutput = if Value.eq change then Nothing else Just (pubKeyTxOut change pubK)
ins = Set.fromList (flip pubKeyTxIn pubK . fst <$> spend)
pure (ins, txOutput)

0 comments on commit e5199ef

Please sign in to comment.
You can’t perform that action at this time.