Skip to content

Commit

Permalink
hlint plus correct Shelley -> Byron
Browse files Browse the repository at this point in the history
  • Loading branch information
paweljakubas committed Jun 20, 2019
1 parent 284e8b2 commit f31da85
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion lib/core/src/Cardano/Wallet/Api/Server.hs
Original file line number Diff line number Diff line change
Expand Up @@ -491,7 +491,7 @@ instance LiftHandler ErrSignTx where
ErrSignTx ErrInvalidTx ->
apiError err403 CreatedInvalidTransaction $ mconcat
[ "I can't process this payment because transactions"
, " with 0 amount are not supported in Shelley."
, " with 0 amount are not supported in Byron."
]
ErrSignTxNoSuchWallet e -> (handler e)
{ errHTTPCode = 410
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ errMsg403NotEnoughMoney has needs = "I can't process this payment because there'

errMsg403InvalidTransaction :: String
errMsg403InvalidTransaction = "I can't process this payment because transactions\
\ with 0 amount are not supported in Shelley."
\ with 0 amount are not supported in Byron."

errMsg403UTxO :: String
errMsg403UTxO = "When creating new transactions, I'm not able to re-use the\
Expand Down
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, when )
( forM, unless )
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
when (not . null $ filter (\(TxOut _ c) -> c == Coin 0) outs)
unless (not (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 f31da85

Please sign in to comment.