Skip to content

Commit

Permalink
add when instead of cryptic unless
Browse files Browse the repository at this point in the history
  • Loading branch information
paweljakubas committed Jun 20, 2019
1 parent 00bf8b6 commit d96cab2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/http-bridge/src/Cardano/Wallet/HttpBridge/Transaction.hs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ import Cardano.Wallet.Primitive.Types
import Cardano.Wallet.Transaction
( ErrMkStdTx (..), TransactionLayer (..) )
import Control.Monad
( forM, unless )
( forM, when )
import Data.ByteString
( ByteString )
import Data.Either.Combinators
Expand All @@ -54,7 +54,7 @@ newTransactionLayer = TransactionLayer
{ mkStdTx = \keyFrom inps outs -> do
let ins = (fmap fst inps)
let tx = Tx ins outs
unless (not (any (\ (TxOut _ c) -> c == Coin 0) outs))
when (any (\ (TxOut _ c) -> c == Coin 0) outs)
$ Left ErrInvalidTx
-- Not working, maybe we need to make TransactionLayer polymorphic
let txSigData = txId @(HttpBridge n) tx
Expand Down

0 comments on commit d96cab2

Please sign in to comment.